compose icon indicating copy to clipboard operation
compose copied to clipboard

Enable Deploying Group of Services

Open jonioni opened this issue 1 year ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched existing issues, it hasn't been reported yet

Use case description

Enable deploying a group of services with common prefix, e.g.

serverless deploy --services=service-a-*

Which should deploy service-a-x, service-a-y, service-a-z (defined in serverless-compose.yml) and associated dependencies.

This is useful in CI/CD environment where deployment can be split into multiple parallel jobs, without having to manually split the serverless-compose.yml file.

Alternative Solution

Enable specifying pseudo service without path and config, e.g.

service-a:
  dependsOn: [service-a-x, service-a-y, service-a-z]

And thus deploy with:

serverless deploy --service=service-a

jonioni avatar May 21 '23 19:05 jonioni

Would be great to also have a way to deploy a selection of services. We use NX monorepo. Currently when we deploy it runs through deployment for every service. NX provides a way to get a list of the services affected by the code changes since the a specific commit and we'd love to use this to tell serverless compose to deploy only the affected services.

AlexStansfield avatar Jun 15 '23 02:06 AlexStansfield