Workflow Overview
Last updated
Last updated
Adding a CI/CD capability into a project repository requires connecting a workflow yml
script created and managed in GitLab with the iCR server offering the analysis. It is assumed that there is a DevOps engineer or someone with equivalent skill, who is already familiar with GitLab CI/CD and who will prepare iCR for integration into GitLab CI/CD. The diagram below will be used as the reference for the steps.
Step 1. GitLab CI/CD employs a framework where customizable functionality can be added in a number of different ways. One of those ways is to implement behavior as a Docker image that can be executed by GitLab. This image, supplied by OpenRefactory, communicates securely with the iCR Navigator to identify and manage the automated workflow. The first step is to prepare the Docker image and register it with GitLab.
Step 2. Once the Docker image is ready, it needs to be registered within each project repository that wants to use it.
Step 3. With the image registered, the DevOps engineer creates the required gitlab-ci.yml
file in the repository. This is what will cause iCR to be triggered. The script is used to provide the iCR server with necessary details about the project. In the case of GitLab, environment variables along with some User supplied variables specify the arguments to the trigger.
Step 4. When the pipeline is executed, the gitlab-ci.yml
script is run. The Navigator will be requested to start an analysis using information provided from the script variables.
Step 5. The Navigator will use that information to determine the correct branch to be analyzed. The Navigator will automatically fetch the source code from the configured GitLab repository and initiate an analysis.
Step 6. Once the analysis completes, the user is notified via an email message. The email is sent to the address defined by one of the variables from Step 3. An email address MUST be provided so that iCR has a way of not only signaling completion, but also a way of communicating any errors that may have occurred.
Step 7. Once notified that analysis is complete and that results are available, the user may login directly to the iCR server which ran the analysis. From that login, the user can enter the Reviewer to process results in exactly the same manner as described in the User Guide for Private Platforms.