BCD command-line interface
On this page you will find detailed information about the BCD CLI with usage examples and reference.
Requirements
-
First, the
bcdcommand requires that theBCD_HOMEenvironment variable is set. By defaultBCD_HOMEis set to/home/bonita/bonita-continuous-deliveryin the controller container. -
Next, the
bcdcommand takes a mandatory option calledscenariothrough the-s / --scenariocommand line option. This option expects an existing relative or absolute path to a BCD YAML scenario file. The BCD scenario path can also be specified through theBCD_SCENARIOenvironment variable, hence allowing to skip the-s / --scenariocommand line option. -
Finally, the BCD CLI expects to find Bonita version-specific dependencies in the
$BCD_HOME/dependenciesdirectory or any of its subdirectories. BCD dependencies include:-
bonita-la-builder-*-exec.jar- (Mandatory) The Bonita Living Application Builder library -
bonita-sp-*-maven-repository.zip- (Optional) The Bonita Maven repository zip if required by your Living Application workspace. Since BCD 3.0.0, dependencies can be retrieved asquay.io/bonitasoft/bcd-dependencies:<bonita_version>Docker images and they must be mounted as volumes in the$BCD_HOME/dependenciesdirectory. You can read more about in Common installation steps
-
Usage examples
Running the build subcommand of the livingapp command with BCD_SCENARIO environment variable and subcommand -p and -e options:
$ export BCD_SCENARIO=scenarios/build-and-deploy.yml
$ bcd livingapp build -p path/to/livingapp-repo -e Test
Running the version command which does not require a scenario file:
$ bcd version
Multi command chaining
The BCD CLI allows to invoke more than one command in one go. This is useful to chain commands as a pipeline.
If one command fails then bcd stops executing any subsequent command it may have.
Examples:
Running build then deploy subcommands of the livingapp command:
$ bcd -s scenarios/vagrant_single.yml --yes \
livingapp build -p path/to/livingapp-repo -e Test deploy
Command-line reference
This section describes the comprehensive usage information for the bcd command.
You can also see this information by running bcd --help and bcd [COMMAND] --help - where COMMAND is in [livingapp, version] - from the command line.
bcd
Bonita Continuous Delivery CLI.
$ bcd [OPTIONS] COMMAND [COMMAND_OPTIONS] SUBCOMMAND [SUBCOMMAND_OPTIONS]...
Options
-s, --scenario <scenario> YAML scenario file path - MANDATORY OPTION unless BCD_SCENARIO environment variable is defined.
-y, --yes Execute action without confirmation prompt
-v, --verbose Enable Ansible verbose mode
--nocolor Turn output colorization off
-e, --extra-vars <extra_vars> Extra vars for Ansible (multiple) - Variables are passed using the key=value syntax.
-h,--help Show this help message
--version Show the version and exit.
livingapp
Manage Bonita Living Application
$ bcd [BCD_OPTIONS] livingapp [OPTIONS] COMMAND1 [COMMAND1_OPTIONS] [COMMAND2
[COMMAND2_OPTIONS]]
Options
-h, --help Show this help message
build
Build Bonita Living Application
$ bcd [BCD_OPTIONS] livingapp [LIVINGAPP_OPTIONS] build [OPTIONS]
Options
-p, --path <path> Bonita Living Application repository path
-e, --environment <environment> Name of the process configuration environment as defined in Bonita Studio
-X, --debug Enable debug mode
-h, --help Show this help message
deploy
Deploy Bonita Living Application
$ bcd [BCD_OPTIONS] livingapp [LIVINGAPP_OPTIONS] deploy [OPTIONS]
Options
-p, --path <path> Bonita Living Application archive or directory path
-c, --configuration-path <configuration_path> Bonita configuration (.bconf) archive path
--http-timeout <http_timeout> (Default: 120) Timeout in seconds for HTTP interactions with Bonita stack. The transaction timeout of the platform should be increased accordingly.
--disable-certificate-check Disable all certificate validation when connecting to a Bonita stack over HTTPS. This option may be used when a self-signed certificate is installed on the target Bonita stack
--development-mode Deploy for development environments (eg. processes and profiles are replaced if existing, organization data are merged).
-X, --debug Enable debug mode
-h, --help Show this help message
extract-conf
Extract parameters from a Bonita configuration archive (.bconf)
$ bcd [BCD_OPTIONS] livingapp [LIVINGAPP_OPTIONS] extract-conf
[OPTIONS]
Options
-p, --path <path> Bonita configuration (.bconf) archive path
--without-value Only extract parameters which do not have a value
-o, --output <output> Output file
-h, --help Show this help message
merge-conf
Merge parameters into a Bonita configuration archive (.bconf)
$ bcd [BCD_OPTIONS] livingapp [LIVINGAPP_OPTIONS] merge-conf [OPTIONS]
Options
-p, --path <path> Bonita configuration (.bconf) archive path
-i, --input <input> Input parameter file
-o, --output <output> Output file
-h, --help Show this help
test
Since 3.6.0
Test Bonita Living Application.
$ bcd [BCD_OPTIONS] livingapp [LIVINGAPP_OPTIONS] test [OPTIONS]
Options
-p, --path <path> Path of the test project. Must be a valid Maven project.
-g, --maven-goals <goals> (Default: verify) Maven goals to run.
--extra-args <extra_args> Extra arguments to pass to the maven command line.
--http-timeout <http_timeout> (Default: 120) Timeout in seconds for HTTP interactions with Bonita Runtime. The transaction timeout of the platform should be increased accordingly.
--disable-certificate-check Disable all certificate validation when connecting to a Bonita Runtime over HTTPS. This option may be used when a self-signed certificate is installed on the target Bonita Runtime
-X, --debug Enable debug mode
-h, --help Show this help message