serverless / compose

Orchestrate Serverless Framework in monorepos
https://serverless.com/framework/docs/guides/compose
MIT License
110 stars 15 forks source link

Enable Deploying Group of Services #184

Open jonioni opened 1 year ago

jonioni commented 1 year ago

Is there an existing issue for this?

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
AlexStansfield commented 1 year ago

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.