CI/CD Jobs
The following topics describe job types for continuous integration and continuous deployment (CI/CD) services.
Job:Atlassian Bitbucket
Atlassian Bitbucket enables you to manage source code, perform code reviews, and control access with branch permissions.
To deploy and run an Atlassian Bitbucket job, ensure that you have installed the Atlassian Bitbucket plug-in with the Provision Service command or the Provision Service command.
For more information about this plug-in, see Control-M for Atlassian Bitbucket.
The following example shows how to run a pipeline:
"Atlassian Bitbucket_Job2":
{
"Type" : "Job:Atlassian Bitbucket",
"ConnectionProfile" : "ABB-USER-1",
"Action" : "Pipeline Actions",
"Pull Request Pipeline" : "unchecked",
"Workspace" : "UserWorkspace",
"Repo Slug" : "RepoSlug",
"Ref Type" : "branch",
"Type Attribute": "pipeline_ref_target",
"Commit" : "unchecked",
"Selector" : "unchecked",
"Get Pipeline Steps Log" : "checked",
"Ref Name" : "main",
"Status Polling Frequency": "60",
"Failure Tolerance": "2"
}
The following example shows how to create a pull request:
"Atlassian Bitbucket_Job3":
{
"Type" : "Job:Atlassian Bitbucket",
"ConnectionProfile" : "BIT",
"Action" : "Pull Requests",
"Pull Request Action" : "Create PR",
"Workspace" : "WorkspaceName",
"Repo Slug" : "repo01",
"Title" : "PR from Control-M",
"Repository Full Name" : " WorkspaceName /repo01",
"Pull Request Source" : "Dev01",
"Pull Request Destination" : "main",
"Reviewers" : "",
"Status Polling Frequency": "60",
"Failure Tolerance": "2"
}
The following example shows how to merge a pull request:
"Atlassian Bitbucket_Job4":
{
"Type" : "Job:Atlassian Bitbucket",
"ConnectionProfile" : "BIT",
"Action" : "Pull Requests",
"Pull Request Action" : "Merge PR",
"Workspace" : "WorkspaceName",
"Repo Slug" : "repo01",
"Repository Full Name" : "gzehavi2/repo01",
"Pull Request ID" : "1",
"Message" : "Merge from Control-M",
"Close Source Branch" : "true",
"Merge Strategy" : "merge_commit",
"Status Polling Frequency": "60",
"Failure Tolerance": "2"
}
The following table describes the Atlassian Bitbucket job parameters.
|
Parameter |
Description |
|---|---|
|
ConnectionProfile |
Determines the ConnectionProfile:Atlassian Bitbucket name that connects to Atlassian Bitbucket. |
|
Action |
Determines one of the following actions to perform:
|
|
Pull Request Action |
Determines one of the following actions to perform on a pull request:
|
|
Pull Request Pipeline |
Determines whether to run a pull request pipeline. |
|
Workspace |
Defines the Bitbucket workspace or project namespace of the repository. |
|
Repo Slug |
Defines the short, URL friendly name of the repository in REST API paths. |
|
Type Attribute |
Determines one of the following pipeline targets:
|
|
Source |
Defines the branch where the pipeline originates. |
|
Destination |
Defines the branch where the pipeline merges. |
|
Destination Commit Hash |
Defines the unique commit hash (SHA) to identify the exact state of the repository where the pull request merges. |
|
Pull Request ID |
Defines a unique string or number of a pull request in the repository. |
|
Ref Type |
Determines the type of reference for the operation, such as a branch, tag, or commit. |
|
Ref Name |
Defines the specific name of the reference targeted by the operation. |
|
Commit |
Determines whether to commit to the specified pipeline. |
|
Hash |
Defines the unique commit hash (SHA) to identify the exact state of the repository for the operation. |
|
Commit Hash |
Defines the commit source to merge into the destination branch. |
|
Selector |
Determines whether to select a specific custom pipeline. |
|
Selector Type |
Determines the method to select the pipeline trigger or branch, such as default, custom, and branches. |
|
Pattern |
Defines the name of the custom pipeline to trigger. |
|
Variables |
Defines the key-value pairs that are passed to the pipeline or to run a job. |
|
Get Pipeline Steps Log |
Determines whether to retrieve the detailed logs for each step within the triggered pipeline. |
|
Title |
Defines the headline or name of the pull request. |
|
Pull Request Source |
Defines the branch where the pull request originates. |
|
Repository Full Name |
Determines the complete identifier of a repository in one of the following formats:
|
|
Pull Request Destination |
Defines the branch where the pull request merges. |
|
Reviewers |
Determines the list of users requested to review the pull request before it is approved and merged. |
|
Message |
Defines the description or commit message associated with an operation, such as merge or commit. |
|
Close Source Branch |
Determines whether to delete the source branch after a pull request is successfully merged. Valid Values:
|
|
Merge Strategy |
Determines one of the following options to integrate pull request changes into the target branch.
|
|
URL Path |
Defines the REST API path segment to access or perform an operation on a specific resource. |
|
Manual JSON |
Defines a manually crafted JSON body sent in a REST request. A JSON is utilized when predefined parameters are insufficient or for advanced customizations. |
|
Status Polling Frequency |
Determines the number of seconds to wait before checking the job status. Default: 10 |
|
Failure Tolerance |
Determines the number of times to check the job status before the job ends Not OK. Default: 3 |
Job:Azure DevOps
Azure DevOps provides an integrated set of services and tools to manage software projects, from planning and development through testing and deployment. Azure DevOps delivers services through a client/server model.
To deploy and run an Azure DevOps job, ensure that you have installed the Azure DevOps plug-in with the Provision Service command or the Provision Service command.
For more information about this plug-in, see Control-M for Azure DevOps.
The following example shows how to define an Azure DevOps job:
"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 ConnectionProfile:Azure DevOps name that connects to Azure DevOps. |
|
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.
|
| 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, as shown in the following example: Copy
|
| 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 checking the job status. 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 installed the CircleCI plug-in with the Provision Service command or the Provision Service command.
For more information about this plug-in, see Control-M for CircleCI.
The following example shows how to define a CircleCI job that triggers a pipeline:S
"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:
"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.
|
|
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: Copy
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:GitHub Actions
GitHub Actions enables you to automate workflows across the software life cycle.
To deploy and run a GitHub Actions job, ensure that you have installed the GitHub Actions plug-in with the Provision Service command or the Provision Service command.
For more information about this plug-in, see Control-M for GitHub Actions.
The following example shows how to run a workflow:
"GitHub Actions_Job_1" :
{
"Type" : "Job:GitHub Actions",
"ConnectionProfile" : "GITHUB",
"Action" : "Workflow Actions",
"Workflow Action" : "Run Workflow",
"Repository Owner" : "gzehavi",
"Repository Name" : "IntegrationTestRepo",
"Workflow File Name" : "workflow.yml",
"Reference" : "main",
"Parameters" : "{}",
"Status Polling Frequency": "60",
"Failure Tolerance": "2"
}
The following example shows how to merge a pull request:
"GitHub Actions_Job_2" :
{
"Type" : "Job:GitHub Actions",
"ConnectionProfile" : "GITHUB",
"Action" : "Pull Request Actions",
"Pull Request Actions" : "Merge PR",
"Repository Owner" : "gzehavi",
"Repository Name" : "IntegrationTestRepo",
"Merge Method" : "Merge",
"PR ID" : "1",
"Commit Title" : "Merge From Control-M",
"Commit Message" : "Merge From Control-M Message",
"Commit SHA" : "<Commit SHA>",
"Host" : "dba-tlv-x6rnno",
"Status Polling Frequency": "60",
"Failure Tolerance": "2"
}
The following table describes GitHub Actions job parameters.
|
Attribute |
Description |
|---|---|
|
ConnectionProfile |
Determines the Connection Profile:GitHub Actions name that connects to GitHub Actions. |
|
Action |
Determines one of the following actions to perform:
|
|
Workflow Action |
Determines one of the following workflow actions to trigger:
|
|
Pull Request Actions |
Determines one of the following actions to perform on a pull request:
|
|
Repository Owner |
Defines the user or organization that owns the target repository. |
|
Repository Name |
Determines the name of the repository where the workflow action or pull request is performed. |
|
Rerun Options |
Determines one of the following options to rerun a GitHub Actions workflow:
|
|
Workflow File Name |
Determines the specific YAML workflow file to execute within the repository. |
|
Reference |
Determines the branch or tag (ref) that the workflow action uses as its source. |
| Parameters |
Defines custom parameters, as key:value pairs, that are passed to the workflow or API call in the following format: {\"Key\":\"Value\",\"Key2\":\"Value2\"} For no parameters, type {}. |
|
Run Attempt ID |
Determines the ID of the run attempt for a workflow or pull request to execute. |
|
Job ID |
Determines the specific job within a workflow or pull request. |
|
Get Workflow Logs |
Determines whether to retrieve the execution logs when you run a workflow. |
|
PR Title |
Defines the headline or name of the pull request. |
|
PR Head |
Defines the branch where the pull request originates. |
|
PR Base |
Defines the branch where the pull request merges. |
|
PR Body |
Defines the description of the pull request. |
|
Draft |
Determines whether the pull request is marked as a draft to indicate if it is ready for review. Valid Values:
|
|
Maintainer Can Modify |
Determines whether administrators who maintain the base repository can push changes to the pull request source branch during creation. Valid Values:
|
|
PR ID |
Determines the unique ID of the pull request. |
|
Commit Title |
Defines the title for the commit , which is created when the pull request is merged. |
|
Commit Message |
Defines the description or message associated with the commit, which is created during the merge. |
|
Commit SHA |
Determines the specific commit hash (commit ID) to validate before the merge. |
|
Merge Method |
Determines one of the following options to integrate pull request changes into the target branch.
|
|
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 the software deployment process.
To deploy and run a Jenkins job, ensure that you have installed the Jenkins plug-in with the Provision Service command or the Provision Service command.
For more information, see Control-M for Jenkins.
The following example shows how to define a Jenkins job:
"Jenkins_Job_2":
{
"Type": "Job:Jenkins",
"ConnectionProfile": "JENKINS_DEV_CI",
"Pipeline Name": "Demo",
"Add Parameters": "checked",
"Variables": [
{
"UCM-PARAMETERS_KEY_001": "param1"
},
{
"UCM-PARAMETERS_VALUE_001": "value1"
},
{
"UCM-PARAMETERS_KEY_002": "param2"
},
{
"UCM-PARAMETERS_VALUE_002": "value2"
}
],
"Add Branch Name": "checked",
"Branch Name": "Development",
"Fetch Console Logs": "unchecked",
"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. If Jenkins segmentation is enabled, you must provide the Jenkins pipeline information in the following format: <foldername>\job\<jobname> |
|
Add Parameters |
Enables you to add parameters for further connection profile configuration. This parameter is required for Parameterized Pipelines. Valid Values:
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. This parameter is required only for Jenkins Multibranch Pipelines and not for Paramterized Pipelines. Valid Values:
Default: Unchecked |
|
Branch Name |
Defines the branch name. |
|
Fetch Console Logs |
Determines whether to display job logs in the output. |
|
Status Polling Frequency |
Determines the number of seconds to wait before checking the job status. Default: 20 |
|
Failure Tolerance |
Determines the number of times to check the job status before the job ends Not OK. Default: 2 |
