@adobe/aio-cli-plugin-cloudmanager
Cloud Manager commands for the Adobe I/O CLI
Last updated 13 days ago by adobe-admin .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @adobe/aio-cli-plugin-cloudmanager 
SYNC missed versions from official npm registry.

oclif Version Build Status License Codecov Coverage Known Vulnerabilities

aio-cli-plugin-cloudmanager

Cloud Manager Plugin for the Adobe I/O CLI

Requirements

Installation

$ aio plugins:install @adobe/aio-cli-plugin-cloudmanager

Updating

$ aio plugins:update

Configuration

Authentication

At minimum, an integration must be created in the Adobe I/O Console which has the Cloud Manager service. You may also add other services to this integration if you want to use other Adobe I/O CLI plugins. For example, to use the Console Plugin, your integration needs to have the "I/O Management API" service.

After you've created the integration, create a config.json file on your computer and navigate to the integration Overview page. From this page, copy the client_id and client_secret values to the config file; if you navigate to the JWT tab in Console, you'll get the value for the jwt_payload.

//config.json 
{
  "client_id": "value from your CLI integration (String)",
  "client_secret": "value from your CLI integration (String)",
  "jwt_payload": { value from your CLI integration (JSON Object Literal) },
  "token_exchange_url": "https://ims-na1.adobelogin.com/ims/exchange/jwt"
}

The last bit you need to have at hand is the private certificate you've used to create the integration; you need the private key, not the public one. Now, you are ready to configure the aio CLI.

First, configure the credentials:

aio config:set jwt-auth PATH_TO_CONFIG_JSON_FILE --file --json

Then, configure the private certificate:

aio config:set jwt-auth.jwt_private_key PATH_TO_PRIVATE_KEY_FILE --file

More information on setting up a Cloud Manager integration in the Adobe I/O console can be found here.

Set Default Program

If you want to avoid passing the program ID flag repeatedly, you can configure it using:

$ aio config:set cloudmanager_programid PROGRAMID

For example

$ aio config:set cloudmanager_programid 4

Set Default Environment

If you want to avoid passing the environment ID argument repeatedly, you can configure it using:

$ aio config:set cloudmanager_environmentid ENVIRONMENTID

For example

$ aio config:set cloudmanager_environmentid 7

This only works for commands where the environmentId is the first argument.

Commands

aio cloudmanager:current-execution:advance PIPELINEID

advance current pipeline execution either by overriding a waiting quality gate or advancing the approval step

USAGE
  $ aio cloudmanager:current-execution:advance PIPELINEID

ARGUMENTS
  PIPELINEID  the pipeline id

OPTIONS
  -p, --programId=programId    the programId. if not specified, defaults to 'cloudmanager_programid' config value
  -r, --passphrase=passphrase  the passphrase for the private key

ALIASES
  $ aio cloudmanager:advance-current-execution

See code: src/commands/cloudmanager/current-execution/advance.js

aio cloudmanager:current-execution:cancel PIPELINEID

cancel current pipeline execution either by cancelling the current step, rejecting a waiting quality gate, or rejecting the approval step

USAGE
  $ aio cloudmanager:current-execution:cancel PIPELINEID

ARGUMENTS
  PIPELINEID  the pipeline id

OPTIONS
  -p, --programId=programId    the programId. if not specified, defaults to 'cloudmanager_programid' config value
  -r, --passphrase=passphrase  the passphrase for the private key

ALIASES
  $ aio cloudmanager:cancel-current-execution

See code: src/commands/cloudmanager/current-execution/cancel.js

aio cloudmanager:current-execution:get PIPELINEID

get pipeline execution

USAGE
  $ aio cloudmanager:current-execution:get PIPELINEID

ARGUMENTS
  PIPELINEID  the pipeline id

OPTIONS
  -j, --json                   output in json format
  -p, --programId=programId    the programId. if not specified, defaults to 'cloudmanager_programid' config value
  -r, --passphrase=passphrase  the passphrase for the private key
  -y, --yaml                   output in yaml format

ALIASES
  $ aio cloudmanager:get-current-execution

See code: src/commands/cloudmanager/current-execution/get.js

aio cloudmanager:environment:delete ENVIRONMENTID

delete environment

USAGE
  $ aio cloudmanager:environment:delete ENVIRONMENTID

ARGUMENTS
  ENVIRONMENTID  the environment id

OPTIONS
  -p, --programId=programId    the programId. if not specified, defaults to 'cloudmanager_programid' config value
  -r, --passphrase=passphrase  the passphrase for the private key

ALIASES
  $ aio cloudmanager:delete-environment

See code: src/commands/cloudmanager/environment/delete.js

aio cloudmanager:environment:download-logs ENVIRONMENTID SERVICE NAME [DAYS]

downloads log files for the specified environment, service and log name for one or more days

USAGE
  $ aio cloudmanager:environment:download-logs ENVIRONMENTID SERVICE NAME [DAYS]

ARGUMENTS
  ENVIRONMENTID  the environment id
  SERVICE        the service
  NAME           the log name
  DAYS           [default: 1] the number of days

OPTIONS
  -o, --outputDirectory=outputDirectory  the output directory. If not set, defaults to the current directory.

  -p, --programId=programId              the programId. if not specified, defaults to 'cloudmanager_programid' config
                                         value

  -r, --passphrase=passphrase            the passphrase for the private key

ALIASES
  $ aio cloudmanager:download-logs

See code: src/commands/cloudmanager/environment/download-logs.js

aio cloudmanager:environment:list-available-log-options ENVIRONMENTID

lists available log options for an environment in a Cloud Manager program

USAGE
  $ aio cloudmanager:environment:list-available-log-options ENVIRONMENTID

ARGUMENTS
  ENVIRONMENTID  the environment id

OPTIONS
  -j, --json                   output in json format
  -p, --programId=programId    the programId. if not specified, defaults to 'cloudmanager_programid' config value
  -r, --passphrase=passphrase  the passphrase for the private key
  -y, --yaml                   output in yaml format

ALIASES
  $ aio cloudmanager:list-available-log-options

See code: src/commands/cloudmanager/environment/list-available-log-options.js

aio cloudmanager:environment:list-variables ENVIRONMENTID

lists variables set on an environment

USAGE
  $ aio cloudmanager:environment:list-variables ENVIRONMENTID

ARGUMENTS
  ENVIRONMENTID  the environment id

OPTIONS
  -j, --json                   output in json format
  -p, --programId=programId    the programId. if not specified, defaults to 'cloudmanager_programid' config value
  -r, --passphrase=passphrase  the passphrase for the private key
  -y, --yaml                   output in yaml format

ALIASES
  $ aio cloudmanager:list-environment-variables

See code: src/commands/cloudmanager/environment/list-variables.js

aio cloudmanager:environment:open-developer-console ENVIRONMENTID

opens the Developer Console, if available, in a browser

USAGE
  $ aio cloudmanager:environment:open-developer-console ENVIRONMENTID

ARGUMENTS
  ENVIRONMENTID  the environment id

OPTIONS
  -p, --programId=programId    the programId. if not specified, defaults to 'cloudmanager_programid' config value
  -r, --passphrase=passphrase  the passphrase for the private key

ALIASES
  $ aio cloudmanager:open-developer-console

See code: src/commands/cloudmanager/environment/open-developer-console.js

aio cloudmanager:environment:set-variables ENVIRONMENTID

sets variables set on an environment. These are runtime variables available to components running inside the runtime environment. Use set-pipeline-variables to set build-time variables on a pipeline.

USAGE
  $ aio cloudmanager:environment:set-variables ENVIRONMENTID

ARGUMENTS
  ENVIRONMENTID  the environment id

OPTIONS
  -d, --delete=delete          variables/secrets to delete
  -j, --json                   output in json format
  -p, --programId=programId    the programId. if not specified, defaults to 'cloudmanager_programid' config value
  -r, --passphrase=passphrase  the passphrase for the private key
  -s, --secret=secret          secret values in KEY VALUE format
  -v, --variable=variable      variable values in KEY VALUE format
  -y, --yaml                   output in yaml format

  --jsonFile=jsonFile          if set, read variables from a JSON array provided as a file; variables set through
                               --variable or --secret flag will take precedence

  --jsonStdin                  if set, read variables from a JSON array provided as standard input; variables set
                               through --variable or --secret flag will take precedence

ALIASES
  $ aio cloudmanager:set-environment-variables

See code: src/commands/cloudmanager/environment/set-variables.js

aio cloudmanager:environment:tail-log ENVIRONMENTID SERVICE NAME

outputs a stream of log data for the specified environment, service and log name

USAGE
  $ aio cloudmanager:environment:tail-log ENVIRONMENTID SERVICE NAME

ARGUMENTS
  ENVIRONMENTID  the environment id
  SERVICE        the service
  NAME           the log name

OPTIONS
  -p, --programId=programId    the programId. if not specified, defaults to 'cloudmanager_programid' config value
  -r, --passphrase=passphrase  the passphrase for the private key

ALIASES
  $ aio cloudmanager:tail-logs
  $ aio cloudmanager:tail-log

See code: src/commands/cloudmanager/environment/tail-log.js

aio cloudmanager:execution:get-quality-gate-results PIPELINEID EXECUTIONID ACTION

get quality gate results

USAGE
  $ aio cloudmanager:execution:get-quality-gate-results PIPELINEID EXECUTIONID ACTION

ARGUMENTS
  PIPELINEID   the pipeline id
  EXECUTIONID  the execution id
  ACTION       (codeQuality|security|performance|contentAudit|experienceAudit) the step action

OPTIONS
  -j, --json                   output in json format
  -p, --programId=programId    the programId. if not specified, defaults to 'cloudmanager_programid' config value
  -r, --passphrase=passphrase  the passphrase for the private key
  -y, --yaml                   output in yaml format

ALIASES
  $ aio cloudmanager:get-quality-gate-results

See code: src/commands/cloudmanager/execution/get-quality-gate-results.js

aio cloudmanager:execution:get-step-details PIPELINEID EXECUTIONID

get execution step details

USAGE
  $ aio cloudmanager:execution:get-step-details PIPELINEID EXECUTIONID

ARGUMENTS
  PIPELINEID   the pipeline id
  EXECUTIONID  the execution id

OPTIONS
  -j, --json                   output in json format
  -p, --programId=programId    the programId. if not specified, defaults to 'cloudmanager_programid' config value
  -r, --passphrase=passphrase  the passphrase for the private key
  -y, --yaml                   output in yaml format

ALIASES
  $ aio cloudmanager:get-execution-step-details

See code: src/commands/cloudmanager/execution/get-step-details.js

aio cloudmanager:execution:get-step-log PIPELINEID EXECUTIONID ACTION

get step log

USAGE
  $ aio cloudmanager:execution:get-step-log PIPELINEID EXECUTIONID ACTION

ARGUMENTS
  PIPELINEID   the pipeline id
  EXECUTIONID  the execution id
  ACTION       (build|codeQuality|devDeploy|stageDeploy|prodDeploy|buildImage) the step action

OPTIONS
  -f, --file=file              the alternative log file name. currently only `sonarLogFile` is available (for the
                               codeQuality step)

  -o, --output=output          the output file. If not set, uses standard output.

  -p, --programId=programId    the programId. if not specified, defaults to 'cloudmanager_programid' config value

  -r, --passphrase=passphrase  the passphrase for the private key

ALIASES
  $ aio cloudmanager:get-execution-step-log

See code: src/commands/cloudmanager/execution/get-step-log.js

aio cloudmanager:list-programs

lists programs available in Cloud Manager

USAGE
  $ aio cloudmanager:list-programs

OPTIONS
  -e, --enabledonly            only output Cloud Manager-enabled programs
  -j, --json                   output in json format
  -r, --passphrase=passphrase  the passphrase for the private key
  -y, --yaml                   output in yaml format

See code: src/commands/cloudmanager/list-programs.js

aio cloudmanager:pipeline:create-execution PIPELINEID

start pipeline execution

USAGE
  $ aio cloudmanager:pipeline:create-execution PIPELINEID

ARGUMENTS
  PIPELINEID  the pipeline id

OPTIONS
  -p, --programId=programId    the programId. if not specified, defaults to 'cloudmanager_programid' config value
  -r, --passphrase=passphrase  the passphrase for the private key

ALIASES
  $ aio cloudmanager:create-execution
  $ aio cloudmanager:start-execution

See code: src/commands/cloudmanager/pipeline/create-execution.js

aio cloudmanager:pipeline:delete PIPELINEID

delete pipeline

USAGE
  $ aio cloudmanager:pipeline:delete PIPELINEID

ARGUMENTS
  PIPELINEID  the pipeline id

OPTIONS
  -p, --programId=programId    the programId. if not specified, defaults to 'cloudmanager_programid' config value
  -r, --passphrase=passphrase  the passphrase for the private key

ALIASES
  $ aio cloudmanager:delete-pipeline

See code: src/commands/cloudmanager/pipeline/delete.js

aio cloudmanager:pipeline:list-variables PIPELINEID

lists variables set on an pipeline

USAGE
  $ aio cloudmanager:pipeline:list-variables PIPELINEID

ARGUMENTS
  PIPELINEID  the pipeline id

OPTIONS
  -j, --json                   output in json format
  -p, --programId=programId    the programId. if not specified, defaults to 'cloudmanager_programid' config value
  -r, --passphrase=passphrase  the passphrase for the private key
  -y, --yaml                   output in yaml format

ALIASES
  $ aio cloudmanager:list-pipeline-variables

See code: src/commands/cloudmanager/pipeline/list-variables.js

aio cloudmanager:pipeline:set-variables PIPELINEID

sets variables set on a pipeline. These are build-time variables available during the build process. Use set-environment-variables to set runtime variables on a environment.

USAGE
  $ aio cloudmanager:pipeline:set-variables PIPELINEID

ARGUMENTS
  PIPELINEID  the pipeline id

OPTIONS
  -d, --delete=delete          variables/secrets to delete
  -j, --json                   output in json format
  -p, --programId=programId    the programId. if not specified, defaults to 'cloudmanager_programid' config value
  -r, --passphrase=passphrase  the passphrase for the private key
  -s, --secret=secret          secret values in KEY VALUE format
  -v, --variable=variable      variable values in KEY VALUE format
  -y, --yaml                   output in yaml format

  --jsonFile=jsonFile          if set, read variables from a JSON array provided as a file; variables set through
                               --variable or --secret flag will take precedence

  --jsonStdin                  if set, read variables from a JSON array provided as standard input; variables set
                               through --variable or --secret flag will take precedence

ALIASES
  $ aio cloudmanager:set-pipeline-variables

See code: src/commands/cloudmanager/pipeline/set-variables.js

aio cloudmanager:pipeline:update PIPELINEID

update pipeline

USAGE
  $ aio cloudmanager:pipeline:update PIPELINEID

ARGUMENTS
  PIPELINEID  the pipeline id

OPTIONS
  -p, --programId=programId    the programId. if not specified, defaults to 'cloudmanager_programid' config value
  -r, --passphrase=passphrase  the passphrase for the private key
  --branch=branch              the new branch
  --repositoryId=repositoryId  the new repositoryId
  --tag=tag                    the new tag

ALIASES
  $ aio cloudmanager:update-pipeline

See code: src/commands/cloudmanager/pipeline/update.js

aio cloudmanager:program:delete PROGRAMID

delete program

USAGE
  $ aio cloudmanager:program:delete PROGRAMID

ARGUMENTS
  PROGRAMID  the program id

OPTIONS
  -r, --passphrase=passphrase  the passphrase for the private key

ALIASES
  $ aio cloudmanager:delete-program

See code: src/commands/cloudmanager/program/delete.js

aio cloudmanager:program:list-current-executions

list running pipeline executions

USAGE
  $ aio cloudmanager:program:list-current-executions

OPTIONS
  -j, --json                   output in json format
  -p, --programId=programId    the programId. if not specified, defaults to 'cloudmanager_programid' config value
  -r, --passphrase=passphrase  the passphrase for the private key
  -y, --yaml                   output in yaml format

ALIASES
  $ aio cloudmanager:list-current-executions

See code: src/commands/cloudmanager/program/list-current-executions.js

aio cloudmanager:program:list-environments

lists environments available in a Cloud Manager program

USAGE
  $ aio cloudmanager:program:list-environments

OPTIONS
  -j, --json                   output in json format
  -p, --programId=programId    the programId. if not specified, defaults to 'cloudmanager_programid' config value
  -r, --passphrase=passphrase  the passphrase for the private key
  -y, --yaml                   output in yaml format

ALIASES
  $ aio cloudmanager:list-environments

See code: src/commands/cloudmanager/program/list-environments.js

aio cloudmanager:program:list-pipelines

lists pipelines available in a Cloud Manager program

USAGE
  $ aio cloudmanager:program:list-pipelines

OPTIONS
  -j, --json                   output in json format
  -p, --programId=programId    the programId. if not specified, defaults to 'cloudmanager_programid' config value
  -r, --passphrase=passphrase  the passphrase for the private key
  -y, --yaml                   output in yaml format

ALIASES
  $ aio cloudmanager:list-pipelines

See code: src/commands/cloudmanager/program/list-pipelines.js

Variables From Standard Input

The environment:set-variables and pipeline:set-variables commands allow for variables to be passed both as flags to the command and as a JSON array provided as standard input or as a file. The objects in this array are expected to have a name, value, and type keys following the same syntax as the Cloud Manager API. Deleting a variable can be done by passing an empty value. For example, given a file named variables.json that contains this:

[
  {
    "name" : "MY_VARIABLE",
    "value" : "something",
    "type" : "string"
  },
  {
    "name" : "MY_SECRET_VARIABLE",
    "value" : "shhhh",
    "type" : "secretString"
  }
]

This can be passed to the pipeline:set-variables command using a shell command of

$ cat variables.json | aio cloudmanager:pipeline:set-variables 1 --jsonStdin

Or

$ aio cloudmanager:pipeline:set-variables 1 --jsonFile variables.json

Development

For development, it is useful to use aio plugins:link to link to a local clone of this repository rather than a specific npm module, e.g.

$ git clone git@github.com:adobe/aio-cli-plugin-cloudmanager.git
$ git checkout -B <your feature branch>
$ npm install
$ aio plugins:link
$ aio cloudmanager:<some command>

It may also be useful during development to point to a different API endpoint than https://cloudmanager.adobe.io, e.g. if you have a mock server you are using. For this you can configure the cloudmanager.base_url configuration key:

$ aio config:set cloudmanager.base_url https://mydummyapiserver

Using an Unreleased aio-lib-cloudmanager

When new functions are added to aio-lib-cloudmanager, it may be useful to use a local copy of this library during the development of this plugin. This can be done using npm-link as a two-step process:

First, in the aio-lib-cloudmanager clone directory, run

npm link

And then in the clone of this project, run

npm link @adobe/aio-lib-cloudmanager

To switch back to the released version of aio-lib-cloudmanager run

npm unlink --no-save @adobe/aio-lib-cloudmanager
npm install

Of course this should not replace proper unit testing.

Current Tags

  • 0.18.2                                ...           latest (13 days ago)

47 Versions

  • 0.18.2                                ...           13 days ago
  • 0.18.1                                ...           13 days ago
  • 0.18.0                                ...           14 days ago
  • 0.17.0                                ...           14 days ago
  • 0.16.3                                ...           16 days ago
  • 0.16.2                                ...           16 days ago
  • 0.16.1                                ...           16 days ago
  • 0.16.0                                ...           19 days ago
  • 0.15.11                                ...           20 days ago
  • 0.15.0                                ...           20 days ago
  • 0.14.1                                ...           2 months ago
  • 0.14.0                                ...           2 months ago
  • 0.13.0                                ...           3 months ago
  • 0.12.0                                ...           4 months ago
  • 0.11.0                                ...           4 months ago
  • 0.10.0                                ...           6 months ago
  • 0.9.0                                ...           6 months ago
  • 0.8.0                                ...           6 months ago
  • 0.7.3                                ...           7 months ago
  • 0.7.2                                ...           7 months ago
  • 0.7.1                                ...           8 months ago
  • 0.7.0                                ...           9 months ago
  • 0.6.2                                ...           9 months ago
  • 0.6.1                                ...           9 months ago
  • 0.6.0                                ...           9 months ago
  • 0.5.2                                ...           a year ago
  • 0.5.1                                ...           a year ago
  • 0.5.0                                ...           a year ago
  • 0.4.0                                ...           a year ago
  • 0.3.3                                ...           a year ago
  • 0.3.2                                ...           a year ago
  • 0.3.1                                ...           a year ago
  • 0.3.0                                ...           a year ago
  • 0.2.1                                ...           a year ago
  • 0.2.0                                ...           a year ago
  • 0.1.6                                ...           a year ago
  • 0.1.5                                ...           a year ago
  • 0.1.4                                ...           a year ago
  • 0.1.3                                ...           a year ago
  • 0.1.2                                ...           a year ago
  • 0.1.1                                ...           a year ago
  • 0.1.0                                ...           a year ago
  • 0.0.5                                ...           a year ago
  • 0.0.4                                ...           a year ago
  • 0.0.3                                ...           a year ago
  • 0.0.2                                ...           a year ago
  • 0.0.1                                ...           a year ago

Copyright 2014 - 2017 © taobao.org |