CI/CD Jobs

The following topics describe job types for continuous integration and continuous dseployment (CI/CD) services.

Job:Ansible AWX

Ansible AWX jobs enable you to manage Ansible playbooks, inventories, and job scheduling.

To deploy and run an Ansible AWX job, ensure that you have completed the following:

To deploy and run an Ansible AWX job, ensure that you have installed the Ansible AWX plug-in with the provision image command or the Provision Service command.

For more information, see Control-M for Ansible AWX.

The following example shows how to launch a named Ansible AWX job template:

Copy
"Ansible AWX_Job_2"
{
   "Type": "Job:Ansible AWX",
   "ConnectionProfile": "ANSIBLE",
   "Action": "Launch Job Template",
   "Job Template Name": "Demo Job Template",
   "Inventory": "Demo Inventory",
   "Parameters": "{"tempo": "30"}",
   "Output Logs": "checked",
   "Status Polling Frequency": "5",
   "Failure Tolerance": "1"
}

The following example shows how to launch an Ansible AWX job template defined by its ID:

Copy
"Ansible AWX_Job_2"
{
   "Type": "Job:Ansible AWX",
   "ConnectionProfile": "ANSIBLE",
   "Action": "Launch Job Template by ID",
   "Job Template ID": "7",
   "Inventory": "Demo Inventory",
   "Parameters": "{"tempo": "30"}",
   "Status Polling Frequency": "5",
   "Failure Tolerance": "1"
}

The following example shows how to launch a named Ansible AWX worklow:

Copy
"Ansible AWX_Job_2"
{
   "Type": "Job:Ansible AWX",
   "ConnectionProfile": "ANSIBLE",
   "Action": "Launch Workflow Job Template",
   "Workflow Template Name": "test",
   "Inventory": "Demo Inventory",
   "Parameters": "{"tempo": "30"}",
   "Status Polling Frequency": "5",
   "Failure Tolerance": "1"
}

The following table describes the Ansible AWX connection profile parameters.

Parameter

Action

Description

ConnectionProfile

All

Determines the ConnectionProfile:Ansible AWX name that connects to Ansible AWX.

Action

NA

Determines one of the following actions to perform:

  • Launch Job Template: Runs a named Ansible AWX job template with configured playbook settings.

  • Launch Job Template by ID: Runs an Ansible AWX job template defined by a numeric ID with configured playbook settings.

  • Launch Workflow Job Template: Runs a set sequence of job templates in an Ansible AWX automation workflow with inventory and other settings.

  • Launch Workflow Job Template without Inventory: Runs each job template in an Ansible AWX automation workflow with its own inventory settings.

  • Sync Inventory Source: Updates hosts of an inventory based on information from cloud services or other resource providers.

  • Sync Project: Refreshes playbooks and other files of a named project from the Ansible AWX source control repository.

  • Sync Project by ID: Refreshes playbooks and other files of a project defined by a numeric ID from the Ansible AWX source control repository.

Job Template Name

Launch Job Template

Determines the name of an Ansible AWX job template that defines how a particular playbook is executed.

If there are several templates with the same name, the job uses the first template found.

Job Template ID

Launch Job Template by ID

Determines the ID of an Ansible AWX job template that defines how a particular playbook is executed.

Workflow Template Name

  • Launch Workflow Job Template

  • Launch Workflow Job Template without Inventory

Determines the name of an Ansible AWX workflow template that defines a sequence of job templates and their relationships.

Project Name

Sync Project

Determines the name of an Ansible AWX project that contains Ansible playbooks and related files.

If there are several projects with the same name, the job uses the first project found.

Project ID

Sync Project by ID

Determines the ID of an Ansible AWX project that contains Ansible playbooks and related files.

Inventory

  • Launch Job Template

  • Launch Job Template by ID

  • Launch Workflow Job Template

  • Sync Inventory Source

Determines a collection of hosts or machines defined in Ansible AWX that is the target environment for job execution.

Inventory Source

Sync Inventory Source

Determines a cloud provider or other source of hosts that Ansible AWX assigns to an inventory.

Parameters
  • Launch Job Template

  • Launch Job Template by ID

  • Launch Workflow Job Template

  • Launch Workflow Job Template without Inventory

Defines job template launch parameters such as inventory, credentials, job variables, and limit options to define how the playbook runs and which host it targets.

Format: {"<paramname>":"<value>"} (JSON format)

Example: {"tempo":30, "verbosity": 1}

Output Logs
  • Launch Job Template

  • Launch Job Template by ID

  • Sync Inventory Source

  • Sync Project

  • Sync Project by ID

Determines whether the job returns a detailed execution record to Control-M.

Status Polling Frequency

All

Determines the number of seconds to wait before checking the job status.

Default: 15

Failure Tolerance

All

Determines the number of times to check the job status before the job ends Not OK.

Default: 15

Job:Azure DevOps

Azure DevOps enables you to efficiently plan, track, manage work, version control your code, automate build and deployment pipelines, and conduct comprehensive testing, within a single, integrated, cloud -based environment.

To deploy and run an Azure DevOps job, ensure that you have completed the following:

For more information, see Control-M for Azure DevOps.

The following example shows how to define an Azure DevOps job:

Copy
"Azure DevOps"
{
   "Type": "Job:Azure DevOps",
   "ConnectionProfile": "AZUREDEVCCP",
   "Project Name": "TestProject",
   "Actions": "Run Pipeline with More Options",
   "Pipeline Id": "1",
   "Show Build Logs": "checked",
   "Stages To Skip": "{\"Test\",\"Deploy\"}",
   "Variables": "\"variable1\": {%4E \"value\": \"var_value1\"%4E },%4E \"variable2\": {%4E \"value\": \"var_value2\",%4E \"isSecret\": true%4E }",
   "Repository Path": "refs/heads/release/MAIN",
   "Parameters": "{\"Param1\":\"value1\", \"Param2\": \"value2\"}",
   "Status Polling Frequency": "60",
   "Failure Tolerance": "3" 
}

The following table describes the Azure DevOps connection profile parameters.

Attribute

Description

ConnectionProfile

Determines the authorization credentials that are used to connect Control-M to Azure DevOps.

Rules:

  • Characters: 1−30

  • Case Sensitive: Yes

  • Invalid Characters: Blank spaces.

Project Name

Defines the name of the project in Azure DevOps that includes the required pipelines database catalog that the job points to when executing the query.

Actions

Determines one of the following actions to perform.

  • Run Pipeline: Runs the pipeline with standard options.

  • Run Pipeline with More Options: Determines whether to include Variables, Parameters, and Stages to Skip when the pipeline runs.

Pipeline ID

Determines the ID number of the pipeline to execute, as defined in Azure.

Repository Path

Defines the branch or ref to trigger the pipeline.

"refs/heads/release/MAIN

Variables

Defines the variables when the pipeline runs, in JSON format.

Copy
"variable1"
{
   "value": "var_value1"
},
"variable2"
{
   "value": "var_value2","isSecret": true
}
Parameters

Defines specific parameters to pass when the Pipeline runs, as pairs of name and value:

Format:{\"Param1\":\"value1\", \"Param2\": \"value2\"}

Stages to Skip

Defines an array of stage names to skip when the pipeline runs.

Show Build Logs

Determines whether to show additional logs.

Status Polling Frequency

Determines the number of seconds to wait before Control-M checks the status of the job or the job's output.

Default: 10

Failure Tolerance

Determines the number of times to check the job status before the job ends Not OK.

Default: 3

Job:CircleCI

CircleCI enables you to automate software development build, test, and deployment processes.

To deploy and run a CircleCI job, ensure that you have completed the following:

For more information, see Control-M for CircleCI.

The following example shows how to define a CircleCI job that triggers a pipeline:S

Copy
"CircleCI_Job_2"
{
   "Type": "Job:CircleCI",
   "ConnectionProfile": "CIRCLE",
   "Action": "Trigger a Pipeline",
   "Project Slug": "github/asafyace/C_FE_Java",
   "Parameters": "{
      "branch": "feature/design-new-api",
      "tag": "v3.1.4159",
      "parameters": {"deploy_prod": true}
       }",
   "Status Polling Frequency": "25",
   "Failure Tolerance": "1"
}

The following example shows how to define a CircleCI job that reruns a workflow from where it failed:

Copy
"CircleCI_Job_2"
{
   "Type": "Job:CircleCI",
   "ConnectionProfile": "CIRCLE",
   "Action": "Rerun A Workflow",
   "Workflow ID": "665b7f2a-5412-41d0-b7bc-18db5ad6603e",
   "Parameters": "{"from_failed":true}",
   "Status Polling Frequency": "25",
   "Failure Tolerance": "1"
}

The following table describes the CircleCI connection profile parameters.

Attribute

Description

ConnectionProfile

Determines the Connection Profile:CircleCI name that connects to CircleCI.

Action

Determines one of the following actions to perform.

  • Trigger a Pipeline: Runs a build process defined in CircleCI.

  • Rerun a Workflow: Executes a workflow of a CircleCI pipeline.

  • Pipeline Details: Gets a CircleCI pipeline definition in JSON format.

Project Slug

Determines the name of the project in CircleCI that includes the target pipeline.

Pipeline ID

Determines the ID of the CircleCI pipeline to retrieve.

Workflow ID

Determines the ID of the CircleCI workflow to execute.

Parameters

(Optional) Defines run time parameters, in JSON format, that are applied when the job executes, as shown in the following example:

{"param1":"value1", "param2":"value2"}

For no parameters, type {}.

Status Polling Frequency

Determines the number of seconds to wait before checking the job status.

Default: 60

Failure Tolerance

Determines the number of times to check the job status before the job ends Not OK.

Default: 2

Job:Jenkins

Jenkins enables you to automate building, testing, and deploying code for repetitive tasks in software deployment process.

To deploy and run a Jenkins job, ensure that you have completed the following:

For more information, see Control-M for Jenkins.

The following example shows how to define a Jenkins job:

Copy
"Jenkins_Job_2"
{
   "Type": "Job:Jenkins",
   "ConnectionProfile": "JENKINS_DEV_CI",
   "Pipeline Name": "Demo",
   "Add Branch Name": "checked",
   "Branch Name": "Development",
   "Add Parameters": "checked",   
   "Variables": [
   {
      "UCM-PARAMETERS_KEY_001": "param1"
   },
   {
      "UCM-PARAMETERS_VALUE_001": "value1"
   },
   {
      "UCM-PARAMETERS_KEY_002": "param2"
   },
   {
      "UCM-PARAMETERS_VALUE_002": "value2"
   }
   ],
   "Status Polling Frequency": "15",
   "Failure Tolerance": "15" 
}

The following table describes the Jenkins job parameters.

Attribute

Description

ConnectionProfile

Determines the Connection Profile:Jenkins name that connects to Jenkins.

Pipeline Name

Determines the name of Jenkins pipeline.

Add Parameters

Enables you to add parameters (variables) for further connection profile configuration.

Valid Values:

  • Checked

  • Unchecked

Default: Unchecked

Variables

Defines the dynamic parameters (variables) for the Jenkins job, in JSON format ( as key:value pairs), which control how the job executes.

Add Branch Name

Enables you to add a branch to a Jenkins Multibranch Pipeline.

Valid Values:

  • Checked

  • Unchecked

Default: Unchecked

Branch Name

Defines the branch name.

Status Polling Frequency

Determines the number of seconds to wait before Control-M checks the status of the job or the job's output.

Default: 20

Failure Tolerance

Determines the number of times to check the job status before the job ends Not OK.

Default: 2