Gitlab CI/CD Integration
Gitlab CI/CD Integration
Introduction
Maintainer: brandi_coleman@bmc.com
See Usage Instructions below for steps to interact with this flow.
This use case is available for the AWS Demo System and Helix Control-M.
Use Case Overview
This use case is designed to interactively simulate how a developer persona would interact with Control-M leveraging Jobs-as-Code and the Automation API using the Forecast Flow workflow.
Use Case Technical Explanation
To effectively demonstrate the interaction between a developer and Control-M Jobs-as-Code and Automation API, an IDE is required (Eclipse, Visual Studio, Notepad++, etc). The demonstration begins with cloning the Gitlab CICD Integration repository into your IDE.
To view and clone the demo flow code-base please Gitlab CICD Integration Git Repository
After cloning the repository, it would be helpful to locally demonstrate the application of the prepared deploy descriptors against the forecast flow JSON job templates. There are 4 deploy descriptors included:
- AWS Sandbox: deploy-descriptor-sand.json
- AWS Production: deploy-descriptor-prod.json
- Helix Sandbox: deploy-descriptor-helix-sand.json
- Helix Pre-Production: deploy-descriptor-helix-preprod.json
(Please see the Usage Instructions section for the specific commands)
After locally demonstrating the use of the prepared deploy descriptors, making a change to the forecast-flow-zzz.json file or forecast-flow-helix-zzz.json by changing the email and/or zip code variable values, and committing this change back to the master branch will automatically trigger the Gitlab CI/CD Pipeline.
This Gitlab CI/CD pipeline includes the following stages for the AWS Sandbox environment, Production AWS environment, Helix Sandbox environment, Helix Pre-Production environment:
- Session Login (Self-Hosted only)
- Deploy Transform
- Run Flow (includes Build)
After the completion of the Gitlab CI/CD Pipeline, it is helpful to navigate to the Monitoring Domain of the Sandbox and Production AWS Demo environment to show the transformed folders, zzz-forecast-flow-sand and zzz-forecast-flow-prod or in the Helix Sand and Pre-Prod environments.
Job Types Included
- OS
Usage Instructions
-
Clone the code-base to to your IDE Clone with HTTPS Link here
-
Demo the application of deploy descriptors locally with the following commands (these commands assume the defined environment names are sandbox and production):
- ctm deploy transform .\jobs\forecast-flow-template.json .\deploy-descriptors\deploy-descriptor-sand.json -e sandbox
- ctm deploy transform .\jobs\forecast-flow-template.json .\deploy-descriptors\deploy-descriptor-prod.json -e production
- ctm deploy transform .\jobs\forecast-flow-helix-template.json .\deploy-descriptors\deploy-descriptor-helix-sand.json -e helix-sand
- ctm deploy transform .\jobs\forecast-flow-helix-template.json .\deploy-descriptors\deploy-descriptor-helix-preprod.json -e helix-preprod
- ctm deploy transform .\jobs\forecast-flow-template.json .\deploy-descriptors\deploy-descriptor-sand.json -e sandbox
-
Modify the zip code and/or email variables in deploy-descriptor-sand.json or deploy-descriptor-prod.json or \deploy-descriptor-helix-sand.json or deploy-descriptor-helix-preprod.json.
-
Commit the changes back to Gitlab
-
Navigate to the CI/CD Pipelines Page here to view running Pipeline
-
Once complete, open the Monitoring Domain in the Sandbox and Production Environments to view the transformed workflow.
???+ note
zzz-getweatherdata job will run on both hosts to accurately reflect temperature due to use of zzz-linux-agents **hostgroups**.