CI/CD Integration
Studio Conductor provides integration with various CI/CD platforms.
Jenkins Plugin
Introduction to Jenkins' Cloudify integration
Specifying Conductor Manager Access
(This section does not apply to the Jenkins plugin)
When using the standard Conductor CLI, the user is required to create a CLI profile, describing the location
of the Conductor Manager as well as credentials. This is traditionally done by using the cfy profiles
command:
cfy profiles use cloudify-host -u admin -p password -t default_tenant
In order to simplify working in CI/CD platforms, the cfyci
utility handles profile creation
automatically by inquiring your job’s environment variables. That way, users of
the Studio Conductor CI/CD integration need not worry about creating a profile; cfyci
does this for you.
The following environment variables are used:
Environment Variable | Purpose |
---|---|
CLOUDIFY_HOST |
Host name / IP address of the Conductor Manager |
CLOUDIFY_USERNAME |
Username for Conductor Manager authentication |
CLOUDIFY_PASSWORD |
Password for Conductor Manager authentication |
CLOUDIFY_TENANT |
Conductor Manager tenant to operate on (defaults to default_tenant ) |
CLOUDIFY_SSL |
false for non-SSL connectivity; any other value is considered as true , which is also the default) |
In addition, you can define the CLOUDIFY_SSL_TRUST_ALL
environment variable as
true
in order to bypass certificate verification. Note that this is generally a bad
idea, especially in production environments.
Common Inputs
(This section does not apply to the Jenkins plugin)
The following inputs are widely used across the Studio Conductor CI/CD integration features:
Input Name | Description |
---|---|
environment-name |
Name of Studio Conductor environment to create, delete or use. This maps to a Studio Conductor Deployment ID. |
outputs-file |
Path to environment’s outputs and capabilities file (see below). |
Default Input Values
(This section does not apply to the Jenkins plugin)
Occasionally, the value “-
” is used as a default value for string parameters. This is done in order to simplify the construction of command
lines.
Environment Outputs and Capabilities File
Certain CI/CD operations (such as “create environment”) can generate a JSON file containing the Studio Conductor Environment’s outputs and capabilities. This file can be used by subsequent steps, for the purpose of carrying out the rest of the CI/CD cycle (for example: obtaining the IP address of a created server).
The structure of the JSON file is as follows:
{
"blueprint_id": "<blueprint_id>",
"deployment_id": "<deployment_id>",
"outputs": {
"output_1": "output_value_1",
"output_2": "output_value_2",
...
},
"capabilities": {
"cap_1": "cap_1",
"cap_2": "cap_2",
...
}
}
blueprint_id
contains the ID of the blueprint from which the environment was created.deployment_id
contains the Studio Conductor deployment ID for the environment.outputs
is a key-value dictionary, mapping output names to values, as would be returned by thecfy deployments outputs
command.capabilities
is a key-value dictionary, mapping capability names to values, as would be returned by thecfy deployments capabilities
command.