Git Product home page Git Product logo

aio-cli-plugin-cloudmanager's Introduction

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

Commands

aio cloudmanager

interact with the Cloud Manager API to list, start, cancel, and inspect pipelines and executions.

USAGE
  $ aio cloudmanager

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

EXAMPLES
  $ aio cloudmanager:list-programs
  $ aio cloudmanager:list-programs --enabledonly
  $ aio cloudmanager:list-pipelines
  $ aio cloudmanager:list-pipelines --programId=PROGRAM_ID
  $ aio cloudmanager:start-execution PIPELINE_ID
  $ aio cloudmanager:start-execution --programId=PROGRAM_ID PIPELINE_ID
  $ aio cloudmanager:list-current-executions
  $ aio cloudmanager:list-current-executions --programId=PROGRAM_ID
  $ aio cloudmanager:get-current-execution PIPELINE_ID
  $ aio cloudmanager:get-current-execution --programId=PROGRAM_ID PIPELINE_ID
  $ aio cloudmanager:get-quality-gate-results PIPELINE_ID [codeQuality|security|performance]
  $ aio cloudmanager:get-quality-gate-results --programId=PROGRAM_ID PIPELINE_ID [codeQuality|security|performance]
  $ aio cloudmanager:get-execution-step-details PIPELINE_ID EXECUTION_ID
  $ aio cloudmanager:get-execution-step-details --programId=PROGRAM_ID PIPELINE_ID EXECUTION_ID
  $ aio cloudmanager:get-execution-step-log PIPELINE_ID
  $ aio cloudmanager:get-execution-step-log --programId=PROGRAM_ID PIPELINE_ID 
  [build|codeQuality|devDeploy|stageDeploy|prodDeploy]
  $ aio cloudmanager:cancel-current-execution PIPELINE_ID
  $ aio cloudmanager:cancel-current-execution --programId=PROGRAM_ID PIPELINE_ID
  $ aio cloudmanager:advance-current-execution PIPELINE_ID
  $ aio cloudmanager:advance-current-execution --programId=PROGRAM_ID PIPELINE_ID
  $ aio cloudmanager:delete-pipeline PIPELINE_ID
  $ aio cloudmanager:delete-pipeline --programId=PROGRAM_ID PIPELINE_ID
  $ aio cloudmanager:update-pipeline PIPELINE_ID --branch=NEW_BRANCH
  $ aio cloudmanager:update-pipeline --programId=PROGRAM_ID PIPELINE_ID --branch=NEW_BRANCH
  $ aio cloudmanager:list-environments
  $ aio cloudmanager:list-environments --programId=PROGRAM_ID
  $ aio cloudmanager:list-available-log-options ENVIRONMENT_ID
  $ aio cloudmanager:list-available-log-options --programId=PROGRAM_ID ENVIRONMENT_ID
  $ aio cloudmanager:download-logs ENVIRONMENT_ID SERVICE NAME
  $ aio cloudmanager:download-logs ENVIRONMENT_ID SERVICE NAME DAYS
  $ aio cloudmanager:download-logs --programId=PROGRAM_ID ENVIRONMENT_ID SERVICE NAME DAYS
  $ aio cloudmanager:tail-log ENVIRONMENT_ID SERVICE NAME
  $ aio cloudmanager:tail-log --programId=PROGRAM_ID ENVIRONMENT_ID SERVICE NAME

See code: src/commands/cloudmanager/index.js

aio cloudmanager:advance-current-execution PIPELINEID

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

USAGE
  $ aio cloudmanager:advance-current-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

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

aio cloudmanager:cancel-current-execution PIPELINEID

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

USAGE
  $ aio cloudmanager:cancel-current-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

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

aio cloudmanager:delete-environment ENVIRONMENTID

delete environment

USAGE
  $ aio cloudmanager:delete-environment 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

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

aio cloudmanager:delete-pipeline PIPELINEID

delete pipeline

USAGE
  $ aio cloudmanager:delete-pipeline 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

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

aio cloudmanager:delete-program PROGRAMID

delete program

USAGE
  $ aio cloudmanager:delete-program PROGRAMID

ARGUMENTS
  PROGRAMID  the program id

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

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

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

lists available logs for an environment in a Cloud Manager program

USAGE
  $ aio cloudmanager: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

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

aio cloudmanager:get-current-execution PIPELINEID

get pipeline execution

USAGE
  $ aio cloudmanager:get-current-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

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

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

get execution step details

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

ARGUMENTS
  PIPELINEID   the pipeline id
  EXECUTIONID  the execution 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

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

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

get step log

USAGE
  $ aio cloudmanager:get-execution-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

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

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

get quality gate results

USAGE
  $ aio cloudmanager: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
  -p, --programId=programId    the programId. if not specified, defaults to 'cloudmanager_programid' config value
  -r, --passphrase=passphrase  the passphrase for the private-key

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

aio cloudmanager:list-available-log-options ENVIRONMENTID

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

USAGE
  $ aio cloudmanager:list-available-log-options 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

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

aio cloudmanager:list-current-executions

list running pipeline executions

USAGE
  $ aio cloudmanager:list-current-executions

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

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

aio cloudmanager:list-environment-variables ENVIRONMENTID

lists variables set on an environment

USAGE
  $ aio cloudmanager:list-environment-variables 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

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

aio cloudmanager:list-environments

lists environments available in a Cloud Manager program

USAGE
  $ aio cloudmanager:list-environments

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

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

aio cloudmanager:list-pipeline-variables PIPELINEID

lists variables set on an pipeline

USAGE
  $ aio cloudmanager:list-pipeline-variables 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

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

aio cloudmanager:list-pipelines

lists pipelines available in a Cloud Manager program

USAGE
  $ aio cloudmanager:list-pipelines

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

See code: src/commands/cloudmanager/list-pipelines.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
  -r, --passphrase=passphrase  the passphrase for the private-key

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

aio cloudmanager:open-developer-console ENVIRONMENTID

opens the Developer Console, if available, in a browser

USAGE
  $ aio cloudmanager: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

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

aio cloudmanager:set-environment-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:set-environment-variables ENVIRONMENTID

ARGUMENTS
  ENVIRONMENTID  the environment id

OPTIONS
  -d, --delete=delete          variables/secrets to delete
  -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

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

aio cloudmanager:set-pipeline-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:set-pipeline-variables PIPELINEID

ARGUMENTS
  PIPELINEID  the pipeline id

OPTIONS
  -d, --delete=delete          variables/secrets to delete
  -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

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

aio cloudmanager:start-execution PIPELINEID

start pipeline execution

USAGE
  $ aio cloudmanager:start-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

See code: src/commands/cloudmanager/start-execution.js

aio cloudmanager:tail-log ENVIRONMENTID SERVICE NAME

lists available logs for an environment in a Cloud Manager program

USAGE
  $ aio cloudmanager: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

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

aio cloudmanager:update-pipeline PIPELINEID

update pipeline

USAGE
  $ aio cloudmanager:update-pipeline 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

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

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 [email protected]: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

aio-cli-plugin-cloudmanager's People

Contributors

dependabot[bot] avatar greenkeeper[bot] avatar justinedelson avatar moritzraho avatar snyk-bot avatar yu1986 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.