Configuring the GitLab Script variables
To trigger a workflow in GitLab CI/CD a special yml script to invoke the container is inserted into the project’s repository. This script MUST be named: .gitlab-ci.yml. OpenRefactory supplies a sample script for use with GitLab CI/CD. This script can be incorporated into a previous workflow script or edited to make the workflow operate as needed. Let’s quickly review the sample script:
If this script exists in a repository, then it will be checked whenever an event occurs that affects the repository. You can learn more about how GitLab CI/CD works by checking out the GitLab CI/CD Website.
There are 2 key sections to the script. The image
section is where the name of the docker component to be executed can be found. This is the component that will connect securely to the Navigator and initiate an analysis.
The script
section invokes the component with a number of important variables. The variables are needed to be able to locate the targeted iCR server and to provide the Navigator with the information required so it can authenticate itself with the proper username and identify the project and branch name.
There are 9 variables in the script. Let’s look at all of them. They are broken into 2 groups: preconfigured environment variables and user supplied variables.
Last updated