Commands
This section provides an overview of the commands available in the develocityctl command line tool. Each command is described along with its subcommands and their functionalities.
To view a list of the commands available in your current Develocity version, run develocityctl with no additional arguments:
develocityctl
Here is a comprehensive overview of all available commands and their subcommands.
Output
Usage: develocityctl [-v] COMMAND A utility for administering Develocity installations Options: -v, --version Print version information and exit. Commands: backup Create and restore database backups config-file Provides tools for authoring a Develocity configuration file build-scan Work with Build Scan data database Execute commands on the Develocity database license Print license file details and convert between license file formats support-bundle Create a support bundle for sending to Gradle support system System command to interact with Develocity Run 'develocityctl COMMAND --help' for more information on a command.
backup
Usage: develocityctl backup COMMAND Create and restore database backups Commands: create Create a database backup copy Copy a database backup to a local file restore Restore the database from a local backup file These commands are only usable when Develocity is using the embedded database. Develocity uses the embedded database by default. If your Develocity installation is configured to connect to a user-managed database, please consult your database service provider or database administrator to configure backups. Run 'develocityctl backup COMMAND --help' for more information on a command.
create
Usage: develocityctl backup create
Create a database backup
Kubernetes cluster options:
--kube-ctx=<context> The Kubernetes context name. Defaults to current context if one is selected.
--kube-ns=<namespace> The namespace containing Develocity.
--kube-url=<url> The Kubernetes API URL for the cluster.
--kube-token=<token> The OAuth token to use.
--kube-trust-certs Ignore certificate validation errors.
copy
Usage: develocityctl backup copy [<backup>]
Copy a database backup to a local file
Parameters:
[<backup>] backup file name to be copied
Kubernetes cluster options:
--kube-ctx=<context> The Kubernetes context name. Defaults to current context if one is selected.
--kube-ns=<namespace> The namespace containing Develocity.
--kube-url=<url> The Kubernetes API URL for the cluster.
--kube-token=<token> The OAuth token to use.
--kube-trust-certs Ignore certificate validation errors.
JAR Examples:
develocityctl backup copy
restore
Usage: develocityctl backup restore <backup>
Restore the database from a local backup file
Parameters:
<backup> local backup file location
Kubernetes cluster options:
--kube-ctx=<context> The Kubernetes context name. Defaults to current context if one is selected.
--kube-ns=<namespace> The namespace containing Develocity.
--kube-url=<url> The Kubernetes API URL for the cluster.
--kube-token=<token> The OAuth token to use.
--kube-trust-certs Ignore certificate validation errors.
JAR Examples:
develocityctl backup restore /somewhere/backup-20220620-111247.zip
config-file
Usage: develocityctl config-file COMMAND Provides tools for authoring a Develocity configuration file Commands: hash Cryptographically hash a secret for storing in a config file generate-key Create a key for symmetric encryption of secrets encrypt Encrypt a secret value for storing in a config file encrypt-all Encrypt all secrets of a config file decrypt Decrypt an encrypted value from a config file decrypt-all Decrypt all secrets of a config file validate Verify that a config file is well-formed schema Prints the JSON schema for Develocity configuration files upgrade Upgrade a config file to a specified or latest schema version Run 'develocityctl config-file COMMAND --help' for more information on a command.
hash
Usage: develocityctl config-file hash [-s=<secret-file>] [-o=<output-file>]
Cryptographically hash a secret for storing in a config file
Hashed values are used for secrets that must be presented to Develocity, such as the system user password.
For secrets that are presented by Develocity, such as the mail server password, see 'encrypt'.
Options:
-s, --secret=<secret-file>
The file containing the secret to hash (use - to read from STDIN)
If omitted, the secret will be prompted for interactively.
-o, --output=<output-file>
The file to write the hashed value to (use - to write to STDOUT)
If omitted, the hashed value will be written to STDOUT.
Supplying the secret inline is not supported to avoid unintentionally leaking it
in the shell history or the process table. You can however simulate this by using STDIN.
Examples:
Reading from secret environment variable
echo "$SECRET" | develocityctl config-file hash -s - -o hashed-secret.txt
Using an inline literal secret
echo "PASSWORD" | develocityctl config-file hash -s - -o hashed-secret.txt
Be mindful that such practices are less secure than using files as it could result
in the key and config being recorded in shell or terminal history.
generate-key
Usage: develocityctl config-file generate-key -o=<output-file>
Create a key for symmetric encryption of secrets
The generated key can be used with the 'encrypt', 'decrypt', 'encrypt-all', 'decrypt-all' commands
to encrypt and decrypt secrets.
The generated key should be treated as a secret itself.
Options:
-o, --output=<output-file>
The file to write the generated key to (use - to write to STDOUT)
As the key can decrypt secrets, take care when writing to STDOUT.
encrypt
Usage: develocityctl config-file encrypt [-k=<key-file>] [-s=<secret-file>] [-o=<output-file>]
Encrypt a secret value for storing in a config file
Encrypted values are used for secrets that must be presented by Develocity, such as the mail server password.
For secrets that are presented to Develocity, such as the system user password, see 'hash'.
Options:
-k, --key=<key-file> The file containing the encryption key (use - to read from STDIN)
The key must be a key generated by the 'generate-key' command.
If omitted, the key will be prompted for interactively.
-s, --secret=<secret-file>
The file containing the secret (use - to read from STDIN)
If omitted, the secret will be prompted for interactively.
-o, --output=<output-file>
The file to write the encrypted secret to (use - to write to STDOUT)
If omitted, the encrypted secret will be written to STDOUT.
When reading both the key and the secret from STDIN, the key is read first terminated by EOL,
then the secret terminated by EOL or EOF.
Supplying the key and/or secret inline is not supported to avoid unintentionally leaking the values
in the shell history or the process table. You can however simulate this by using STDIN.
Examples:
Reading key and secret from environment variables
printf "%s\n%s" "$KEY" "$SECRET" | develocityctl config-file encrypt -k - -s -
Reading key from file and inline secret
echo "PASSWORD" | develocityctl config-file encrypt -k /path/to/key/file -s -
Be mindful that such practices are less secure than using files as it could result
in the key and secret values being recorded in shell or terminal history.
encrypt-all
Usage: develocityctl config-file encrypt-all [-k=<key-file>] -c=<config-file> [-o=<output-file>]
Encrypt all secrets of a config file
If the file is valid and contains no already encrypted secrets the exit code will be 0,
with the config with all secrets encrypted written to <output-file>.
If the file is invalid or has already encrypted secrets the exit code will be 1,
with a description of the problems written to STDERR.
Options:
-k, --key=<key-file> The file containing the encryption key (use - to read from STDIN)
The key must be a key generated by the 'generate-key' command.
If omitted, the key will be prompted for interactively.
-c, --config=<config-file>
The file containing the config (use - to read from STDIN)
-o, --output=<output-file>
The file to write the encrypted config to (use - to write to STDOUT)
If omitted, the config will be written to STDOUT.
When reading both the key and the config from STDIN, the key is read first terminated by EOL,
then the config terminated by EOF.
Supplying the key and config inline is not supported to avoid unintentionally leaking it
in the shell history or the process table. You can however simulate this by using STDIN.
Examples:
Reading key and config from environment variables
printf "%s\n%s" "$KEY" "$CONFIG" | develocityctl config-file encrypt-all \
-k - -c - -o encrypted-config.yaml
Reading key from file and config from environment variable
echo "$CONFIG" | develocityctl config-file encrypt-all \
-k /path/to/key/file -c - -o encrypted-config.yaml
Be mindful that such practices are less secure than using files as it could result
in the key and config being recorded in shell or terminal history.
decrypt
Usage: develocityctl config-file decrypt [-k=<key-file>] [-s=<secret-file>] -o=<output-file>
Decrypt an encrypted value from a config file
The encrypted secret must have been created by the 'encrypt' command.
Encrypted values are used for secrets that must be presented by Develocity, such as the mail server password.
For secrets that are presented to Develocity, such as the system user password, see 'hash'.
Options:
-k, --key=<key-file> The file containing the encryption key (use - to read from STDIN)
The key must be a key generated by the 'generate-key' command.
If omitted, the key will be prompted for interactively.
-s, --secret=<secret-file>
The file containing the secret (use - to read from STDIN)
If omitted, the secret will be prompted for interactively.
-o, --output=<output-file>
The file to write the decrypted secret to (use - to write to STDOUT)
As the output contains decrypted secrets, take care when writing to STDOUT.
When reading both the key and the secret from STDIN, the key is read first terminated by EOL,
then the secret terminated by EOL or EOF.
Supplying the key and/or secret inline is not supported to avoid unintentionally leaking the values
in the shell history or the process table. You can however simulate this by using STDIN.
Examples:
Reading key and secret from environment variables
printf "%s\n%s" "$KEY" "$SECRET" | develocityctl config-file decrypt -k - -s - -o decrypted.txt
Reading key from file and secret from environment variable
echo "$SECRET" | develocityctl config-file decrypt -k /path/to/key/file -s - -o decrypted.txt
Be mindful that such practices are less secure than using files as it could result
in the key and secret values being recorded in shell or terminal history.
decrypt-all
Usage: develocityctl config-file decrypt-all [-k=<key-file>] -c=<config-file> -o=<output-file>
Decrypt all secrets of a config file
If the file is valid and contains no encrypted secrets encrypted with a different key the exit code will be 0,
with the config with all secrets decrypted written to <output-file>.
If the file in invalid or has secrets encrypted with a different key, the exit code will be 1
with a description of the problems written to STDERR.
Options:
-k, --key=<key-file> The file containing the encryption key (use - to read from STDIN)
The key must be a key generated by the 'generate-key' command.
If omitted, the key will be prompted for interactively.
-c, --config=<config-file>
The file containing the config (use - to read from STDIN)
-o, --output=<output-file>
The file to write the encrypted config to (use - to write to STDOUT)
As the output contains decrypted secrets, take care when writing to STDOUT.
When reading both the key and the config from STDIN, the key is read first terminated by EOL,
then the config terminated by EOF.
Supplying the key and config inline is not supported to avoid unintentionally leaking it
in the shell history or the process table. You can however simulate this by using STDIN.
Examples:
Reading key and config from environment variables
printf "%s\n%s" "$KEY" "$CONFIG" | develocityctl config-file decrypt-all \
-k - -c - -o decrypted-config.yaml
Reading key from file and config from environment variable
echo "$CONFIG" | develocityctl config-file decrypt-all \
-k /path/to/key/file -c - -o decrypted-config.yaml
Be mindful that such practices are less secure than using files as it could result
in the key and config being recorded in shell or terminal history.
validate
Usage: develocityctl config-file validate FILE
Verify that a config file is well-formed
If the file is valid, the exit code will be 0 with no logging output.
If the file is invalid, the exit code will be 1 with a description of the problems written to STDERR.
The file may have encrypted or plain text secrets.
To verify that file can be decrypted with a given key, use the 'decrypt-all' command instead of this.
Parameters:
FILE The config file to validate (use - to read from STDIN)