@commercetools-frontend/deployment-cli
v2.0.2
Published
CLI to manage Custom Applications deployments in Google Storage.
Downloads
5,518
Readme
@commercetools-frontend/deployment-cli
This is a CLI used internally for Merchant Center applications. We do not provide any guarantees or support for the functionality.
This CLI provides useful commands to trigger deployments through CircleCI to different cloud environment.
Usage
Please make sure you have Node.js v14 or higher installed.
The CLI relies on certain configuration which has to be specified in a deployment
cosmiconfig file for example deployment.config.cjs
to facilitate interaction with the CircleCI API.
Each of the fields in the example are required to run commands successfully:
module.exports = {
CircleCI: {
projectName: 'merchant-center-application',
},
};
Other fields exist but they are defaulted to minimize what values have to be specified:
module.exports = {
CircleCI: {
apiBaseUrl: 'https://circleci.com/api/v2',
deploymentWorkflowName: 'test_build_and_deploy',
pagination: {
maxPages: 42,
pagesForPipelineSelection: 5,
},
deployments: {
'my-deployment-name': {
jobs: {
approval: 'approval-job-name',
deployment: 'deploymnet-job-name',
},
},
},
},
};
Command: approve
This command interacts with the CircleCI API and triggers a deployment by approving it.
pnpm deployment-cli approve --approval-job=can_d_p_a-my-deployment-name
If a deployments
config property is specified you can reference by:
pnpm deployment-cli approve --deployment=my-deployment-name
where products
is a name of a deployment you configured in your configuration with approval
and deployment
(optional) configured on the jobs
property.