Skip to content

Instantly share code, notes, and snippets.

@AlexNDRmac
Created January 2, 2020 12:30
Show Gist options
  • Save AlexNDRmac/12ad9a046eca023db632a6b0efe947f0 to your computer and use it in GitHub Desktop.
Save AlexNDRmac/12ad9a046eca023db632a6b0efe947f0 to your computer and use it in GitHub Desktop.
CircleCi local run
#!/bin/bash
# Use CircleCI from the command line.
# This project is the seed for CircleCI's new command-line application.
# For more help, see the documentation here: https://circleci.com/docs/2.0/local-cli/
# Usage:
# circleci [command]
# Available Commands:
# config Operate on build config files
# diagnostic Check the status of your CircleCI CLI.
# help Help about any command
# local Debug jobs on the local machine
# namespace Operate on namespaces
# orb Operate on orbs
# query Query the CircleCI GraphQL API.
# setup Setup the CLI with your credentials
# update This command is unavailable on your platform
# version Display version information
# Flags:
# -h, --help help for circleci
# --host string URL to your CircleCI host, also CIRCLECI_CLI_HOST (default "https://circleci.com")
# --token string your token for using CircleCI, also CIRCLECI_CLI_TOKEN
# Use "circleci [command] --help" for more information about a command.
# Run a job in a container on the local machine
# Usage:
# circleci local execute [flags]
# Flags:
# --branch string Git branch
# --checkout-key string Git Checkout key (default "~/.ssh/id_rsa")
# -c, --config string config file (default ".circleci/config.yml")
# -e, --env -e VAR=VAL Set environment variables, e.g. -e VAR=VAL
# -h, --help help for execute
# --index int node index of parallelism
# --job string job to be executed (default "build")
# --node-total int total number of parallel nodes (default 1)
# --repo-url string Git Url
# --revision string Git Revision
# --skip-checkout use local path as-is (default true)
# -v, --volume strings Volume bind-mounting
# Global Flags:
# --host string URL to your CircleCI host, also CIRCLECI_CLI_HOST (default "https://circleci.com")
# --token string your token for using CircleCI, also CIRCLECI_CLI_TOKEN
circleci local execute \
--config ./.circleci/config.yml \
--job build
# -v /home/circleci/project:`pwd` \
#--skip-checkout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment