@commercetools-frontend/deployment-cli
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

@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.

Package Sidebar

Install

npm i @commercetools-frontend/deployment-cli

Weekly Downloads

2,900

Version

1.0.1

License

MIT

Unpacked Size

88.8 kB

Total Files

19

Last publish

Collaborators

  • tdeekens
  • emmenko
  • commercetools-admin