Jet steps

2 minute read

Description

Run your CloudBees CodeShip Pro pipeline steps.

Usage

jet steps [flags]

Flags

Name, shorthand

Default

Description

--ci-branch

The name of the branch being built

--ci-build-id

The id of the build being run

--ci-commit-description

The short description of the current commit, e.g. git describe

--ci-commit-id

The id/sha of the commit being built

--ci-commit-message

The message of the commit being built

--ci-committer-email

The email of the commiter

--ci-committer-name

The name of the commiter

--ci-committer-username

The username of the commiter

--ci-project-id

The id of the project being built

--ci-repo-name

The name of the scm repository being built

--debug

Turn debug output on

--dir

Current Directory

The directory to use

--dockercfg-service

The name of the service with which the dockercfg should be generated

--encrypted-dockercfg-path

The path to the encrypted dockercfg file to be used

--env, -e

Set an environment variable (can be used multiple times)

--key-path

codeship.aes

The key path for encrypting secure environment variables.

--no-remove

Do not remove any containers that are run, overrides all other settings

--no-tty, -T

Disable pseudo-tty allocation

--pull-if-present

false

Pull images that are already present

--push

Run push steps

--services-path

codeship-services.yml

The relative services path

--steps-path

codeship-steps.yml

The relative steps path

--tag

The tag to use

Extended description

Executing the jet steps command will build the services defined in the codeship-services.yml file, and execute the steps in the codeship-steps.yml file.

The jet steps command skips push steps and branch/tag specific steps unless the appropriate flags are passed to the command.

Docker will use existing images when running jet locally. This may lead to builds passing locally, and failing remotely on CodeShip. This is due to the remote environment starting without any prior images. We recommend removing any locally saved Docker images prior to running jet steps for a more consistent result to the remote server.

Examples

Steps with Push

$ jet steps --push (step: tests) ... (step: tests) success ✔ (step: push_service) ...

Using the --push flag will execute any push steps in the codeship-steps.yml file. If the step is also a branch/tag specific step, use --tag in conjunction with --push.

Specify Branch or Tag

It is often necessary to test branch/tag specific steps. To do this, use the --tag flag to specify a branch or tag name.

$ jet steps --tag master $ jet steps --tag staging

Using CI Flags

A remote build has access to default environment variables populated from the SCM. You can pass similar data to test the behavior. A normal practice is to use the commit-id in a container tag, for example.

$ jet steps --ci-commit-id 1234ABCD --ci-branch master --ci-committer-name "Jane Doe" --ci-commit-message "A random message from the committer"