As part of the development environment, I have stacks named mock-api, mock-something, etc. I want to deploy them only on dev environments, not production.
Right now I'm deploying my monorepo stacks with Lerna:
"deploy": "lerna run deploy --stream --",
"deploy:prod": "lerna run deploy --stream --ignore 'mock-*' -- --stage prod",
The deploy command is deploying everything. The deploy:prod is used in CI for deployment to the prod stage, and does not deploy packages (services) with names starting with mock-.
Proposal
Introduce --include and --exclude params to serverless-compose. Such flags are popular across different tools.
--include would make the serverless-compose deploy only explicitly listed services
--exclude would make the serverless-compose deploy all services apart from the ones listed
Using both --include and --exclude would make slsc deploy all services listed in the "include" except for the ones listed in the "exclude".
Both params should accept multiple comma-separated service names and allow simple matching with *.
Usage examples:
Deploy all services which names do not start with mock-:
slsc deploy --exclude mock-*
Deploy only api and resources services:
slsc deploy --include api,resources
Deploy all services starting with api- apart from the ones ending with -mock:
Problem
As part of the development environment, I have stacks named
mock-api
,mock-something
, etc. I want to deploy them only on dev environments, not production.Right now I'm deploying my monorepo stacks with Lerna:
The
deploy
command is deploying everything. Thedeploy:prod
is used in CI for deployment to theprod
stage, and does not deploy packages (services) with names starting withmock-
.Proposal
Introduce
--include
and--exclude
params toserverless-compose
. Such flags are popular across different tools.--include
would make the serverless-compose deploy only explicitly listed services--exclude
would make the serverless-compose deploy all services apart from the ones listedUsing both
--include
and--exclude
would make slsc deploy all services listed in the "include" except for the ones listed in the "exclude".Both params should accept multiple comma-separated service names and allow simple matching with
*
.Usage examples:
Deploy all services which names do not start with
mock-
:Deploy only
api
andresources
services:Deploy all services starting with
api-
apart from the ones ending with-mock
: