serverless / compose

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

Serverless Compose is not supported on the Serverless CI/CD dashboard #192

Open codinronan opened 5 months ago

codinronan commented 5 months ago

Is there an existing issue for this?

Use case description

From what I can tell, using serverless-compose is not supported in the CI/CD dashboard (e.g. using app.serverless.com, connected to Github to deploy on merge to a branch).

The issue is that the CI/CD process APPEARS to hard-code the following command:

serverless deploy --stage <stage> --region <region> --force --org <our org> --app <app name> --verbose

where the values in braces are taken from the serverless.yml file of the service in question (so it DOES seem to be aware of a serverless.yml file inside that folder and is reading it to get those values).

The problem is that while per-service serverless deploy understands the CLI params region, org, app and force, the serverless-compose CLI does not. So this throws an error:

Build step: serverless deploy --stage <value> --region us-east-1 --force --org <value> --app <value> --verbose 
Environment: linux, node 18.18.0, compose 1.3.0
Docs:        slss.io/docs-compose
Bugs:        github.com/serverless/compose/issues

Error:
Unrecognized CLI options: "--region", "--force", "--org", "--app"
CLI options "--region", "--force", "--org", "--app" are Serverless Framework-specific options that are not supported in Compose

You can search and/or open feature requests here: https://github.com/serverless/compose

ServerlessError: Unrecognized CLI options: "--region", "--force", "--org", "--app"

CLI options "--region", "--force", "--org", "--app" are Serverless Framework-specific options that are not supported in Compose

You can search and/or open feature requests here: https://github.com/serverless/compose
    at validateCliOptions (/data-integrations/node_modules/@serverless/compose/src/validate-options.js:70:9)
    at runComponents (/data-integrations/node_modules/@serverless/compose/src/index.js:125:3)

Verbose logs are available in ".serverless/compose.log"
Build step failed: serverless deploy --stage <value> --region us-east-1 --force --org <value> --app <value> --verbose 

How can I use a serverless-compose project in the Serverless CI/CD process?

Note: We ALSO tried changing the base path value in the settings UI, to the folder containing the sub service, and it throws a message saying "invalid serverless configuration file path". So I don't think this works either.

Proposed solution (optional)

No response