iCR Workflow Integration Guide
WebTry iCR
CI/CD Workflow 3.0
CI/CD Workflow 3.0
  • Table of contents
    • Introduction
    • Jenkins Workflow
      • Installing the plugin
      • Configuring the plugin
        • Creating a Personal Access Token
        • Copying Your Repository's URL
      • Viewing the Results
    • GitHub Actions Workflow
      • Workflow Overview
      • Preparing and Registering the Docker Image
        • Adding a Workflow to a Repository
      • Preparing the GitHub Workflow
        • Environment Variables
        • User Supplied Secrets
        • Setting the User Defined Secrets Values
      • Executing the Workflow
    • GitLab Workflow
      • Workflow Overview
      • Preparing the Docker Image
      • Configuring the GitLab Script variables
        • Environment Variables
        • User Supplied Variables
        • Creating a Personal Access Token
        • Setting the User Defined Variable Values
      • Executing the Workflow
    • Multiple Workflows
    • Appendix A - Getting a BitBucket App Password for JENKINS
Powered by GitBook
On this page

Was this helpful?

  1. Table of contents
  2. GitLab Workflow

Configuring the GitLab Script variables

PreviousPreparing the Docker ImageNextEnvironment Variables

Last updated 1 year ago

Was this helpful?

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:

stages:
  - iCR

iCR:
  image: registry.gitlab.com/or-testuser/orbot/icr-gitlab:latest
  stage: iCR
  script:
    - '/workspace/configure_run.sh ${CI_PROJECT_ID} ${CI_COMMIT_BRANCH} ${CI_PROJECT_URL} ${OR_ICR_URL} ${OR_SECRET_TOKEN} ${OR_PASSPHRASE} ${OR_MAIL_ADDRESS} ${OR_LANGUAGE_VERSION}'

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 .

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 8 variables in the script. Let’s look at all of them. They are broken into 2 groups: preconfigured environment variables and user supplied variables.

GitLab CI/CD Website