CLI Reference¶
Concourse Tools contains a CLI for a number of small tasks to help write and deploy resource types.
Command |
Description |
|---|---|
Create the assets script directory. |
|
Create the Dockerfile. |
|
Invoke the legacy CLI. |
assets¶
Create the assets script directory.
$ python3 -m concoursetools assets <path> [OPTIONS]
path
The location at which to the script files will be written. Pass ‘.’ to write scripts to the current directory.
-e, --executable
The python executable to place at the top of the file. Defaults to ‘/usr/bin/env python3’.
-r, --resource-file
The path to the module containing the resource class. Defaults to ‘concourse.py’.
-c, --class-name
The name of the resource class in the module, if there are multiple.
dockerfile¶
Create the Dockerfile.
$ python3 -m concoursetools dockerfile <path> [OPTIONS]
path
The location to which to write the Dockerfile. Pass ‘.’ to write it to the current directory.
-e, --executable
The python executable to place at the top of the file. Defaults to ‘/usr/bin/env python3’.
--image
Specify the image used in the FROM instruction.
--tag
The tag to combine with the image. Defaults to the major/minor version of the current Python environment.
--suffix
An optional suffix to combine with the tag to create the full tag.
-r, --resource-file
The path to the module containing the resource class. Defaults to ‘concourse.py’.
-c, --class-name
The name of the resource class in the module, if there are multiple.
--pip-args
An optional string to be appended to all calls to pip, e.g. ‘–timeout 100’.
--include-rsa
Enable the Dockerfile to (securely) use your RSA private key during building.
--include-netrc
Enable the Dockerfile to (securely) use your netrc file during building.
--encoding
The encoding of the created file. If not passed, Concourse Tools will use the user’s default encoding.
--no-venv
Pass to explicitly not use a virtual environment within the image. This is not recommended and exists to ensure legacy behaviour.
--dev
Pass to copy a local version of Concourse Tools to the image, instead of installing from PyPI. The onus is on the user to ensure that the “concoursetools” exists in the working directory at Docker build time.
legacy¶
Invoke the legacy CLI.
$ python3 -m concoursetools legacy <path> [OPTIONS]
path
The location at which to place the scripts.
-e, --executable
The python executable to place at the top of the file. Defaults to ‘/usr/bin/env python3’.
-r, --resource-file
The path to the module containing the resource class. Defaults to ‘concourse.py’.
-c, --class-name
The name of the resource class in the module, if there are multiple.
--docker
Pass to create a skeleton Dockerfile at the path instead.
--include-rsa
Enable the Dockerfile to (securely) use your RSA private key during building.