Skip to content

jeroenmanders/circleci-demo-context-cli

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CircleCI Contexts CLI Demo CircleCI

Repository showcasing usage of CircleCI's new context CLI functionality.

Prerequisites for this example project

  • Need to have the following env variables set, either project-level or context-level:
Variable Description
VCS Either "github" or "bitbucket"
CIRCLECI_CLI_TOKEN A personal API token for CircleCI. User must have org-level/admin permissions

What's happening in this example config?

  1. We use the CircleCI CLI Orb to install the client-side CLI and setup auth with the CIRCLECI_CLI_TOKEN variable.
orbs:
  circleci-cli: circleci/[email protected]

# ...
jobs:
  context-cli-test:
    # ...
    steps:
      - circleci-cli/install
      - circleci-cli/setup
  1. Then we demonstrate the Context CLI functionality in multiple steps. The commands generally follow this format:
circleci context FUNCTION $VCS $CIRCLE_PROJECT_USERNAME [FUNCTION-SPECIFIC_ARGS...]

The current functions available include create/delete of context, and create/delete of variables inside the context. $VCS you should have set as a prerequisite, and $CIRCLE_PROJECT_USERNAME refers to the org name owning the current project.

Run circleci context or circleci context -h for more help and information on available commands.

About

Repository showcasing usage of CircleCI's new context CLI functionality

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published