Codeship local development CLI

These commands are applicable if you want to run the Codeship local development CLI, jet binary, locally. Some of these options are only available locally and are unavailable in the hosted Codeship environment. If you haven’t already, you will need to install Jet.

For a list of all available Jet commands simply run the following on a command line.

jet help

All of the available commands have these common flags:

  • --system print extra system log information.

Main commands

These are the main commands to use for loading and running services and steps.

All of the main commands have some common flags:

  • --dir specify a different context directory
  • --keep-volume-containers by default at the end of a run, all volume containers are deleted. This will keep them around.
  • --no-cache do not use Docker’s local image cache. All services will be rebuilt.
  • --print-build-output by default, docker build’s output is suppressed. If you want to have it, use this flag.
  • --services-path specify the path to the YAML or JSON services file, if the file you want to use is not in one of the default locations.
  • --key-path if you have encrypted environment variables, this specifies the path to your encryption key. If not specified, this uses the default location from jet generate.

jet steps

This is the command to run your steps as specified in your configuration.

This command has some additional flags:

  • --no-parallel turn off parallelism. This will run your parallel steps serially. Generally, you shouldn’t use this, and this is included for debugging purposes only. This flag might be removed before the first stable release.
  • -T disable pseudo-tty allocation, which is done by default for the steps command.
  • --steps-path specify the path to the YAML or JSON steps file, if the file you want to use is not in one of the default locations.
  • --tag the tag to use

For a full list of all the variables and commands you can pass when running jet steps, just run jet steps --help.

jet run

This is analogous to docker-compose’s run command This runs a one-off command on a service specified in your configuration.

For example, if your configuration specifies a service named app and this image has the echo binary available, running the following command will print Hello World to your screen.

jet run app echo "Hello World"

This command has some additional flags:

  • -e add or override an environment variable, similar to docker run. This flag can be used multiple times.
  • --entrypoint override the entry point of the image.
  • -T disable pseudo-tty allocation, which is done by default for the run command.

jet load

This is analogous to docker-compose’s pull and build commands:

  • If the image directive is specified for a service, this will pull the image.
  • If the build directive is specified for a service, this will build the image.

Encryption commands

These commands are for generating keys, and encrypting and decrypting environment variable or .dockercfg files.

jet generate

Generate new keys for use with the CLI. The generated keys are saved to codeship.aes in the current directory by default.

You can specify alternate keys for every other command with --key-path, otherwise keys are looked up in the location mentioned above. Note, that you do not need to generate a key unless you either require encrypted environment variables or plan to use push steps (which require an encrypted dockercfg).

jet encrypt [infile] [outfile]

Encrypt a file. If this is a YAML file containing environment variable, you can use the encrypted file directly with the encrypted_env_file directive in your services definition.

jet decrypt [infile] [outfile]

Decrypt a file. This is useful to make sure the encryption worked properly.

Need More Help?

Get in touch if you need more help, or post on Stack Overflow using the tag #Codeship.