Before you can go through the detailed steps to implement a Continuous Integration (CI)/Continuous Delivery (CD) workflow, you need to provide following prerequisites.
As shown in the picture on the previous page, the suggested workflow requires three (3) environments:
We suggest creating a group for each environment and three different apps, and adding one app to each group. It allows to clearly distinguish between environments, to minimize the risk of disruption caused by human error and to simulate a real world scenario where different actors operate different environments.
For example, you can have:
Each group/app pair creates and accesses resources in its environment. To clearly separate environments, each app must belong to only one group.
For information on groups, apps and adding apps to groups, see the Teams and Permissions User Guide.
Both Step 2 and Step 3 in the CI/CD workflow require the creation of the following catalogs and layers:
For Step 2, Validation script located in
jenkins/step2.groovy creates the catalogs and layers required in the test environment with the configuration file
deployments/auto-sensor-1-archive.json for the test input catalog and the configuration file
deployments/auto-sensor-2-learnings.json for the test output catalog. The Jenkins job orchestrating this step must use the credentials associated with App-Y (Group-Y).
For Step 3, Deployment script located in
jenkins/step3.groovy assumes the catalogs are already created and accessible. The Jenkins job orchestrating this step must use the credentials associated with App-Z (Group-Z).
For information on how to create layers, see the Data User Guide.
The CI/CD workflow needs access to the catalogs and layers used in your code.
Additionally, if you need to access data within the catalogs from your local development or Jenkins environment, you must share the required catalogs with the app used to create these catalogs. If you need to access data within the catalogs from inside the pipeline, you must share the catalogs with the group used to create the pipeline (Group-Y for test catalogs, Group-Z for production catalogs).
For information about sharing catalogs, see the Data User Guide.
Both Step 2 and Step 3 require a pipeline to run the code you are testing. For Step 2,
jenkins/step2.groovy creates the pipeline required for the test environment with the configuration file
deployments/test/deployment.properties. The Jenkins job orchestrating this step must use the credentials related to Group-Y/App-Y.
For Step 3,
jenkins/step3.groovy creates the pipeline required for the production environment with the configuration file
deployments/prd/deployment.properties if it doesn't exist. The The id of created pipeline is saved in the Jenkins job configuration. Jenkins job orchestrating this step must use the credentials related to Group-Z/App-Z.