Integrating iCR Into Your CI/CD Workflows
Frequent users of iCR may want to integrate iCR into their regular Continuous Integration/Continuous Deployment (CI/CD) operation. Integrating into the CI/CD workflow empowers the operations team to ensure that code is routinely checked for errors and that developers are given the opportunity to review and correct those errors.
A detailed description of how iCR may be integrated into CI/CD workflows is presented. Support for Jenkins, GitHub and GitLab, three of the most popular CI/CD workflow frameworks available, is provided.
Referencing the Admin Guide, you can determine where to find the CI/CD information from your iCR release package. In that package you will find a subdirectory named icr-CICD-package
which holds 6 files to be used to integrate iCR into Jenkins, GitHub Actions or GitLab CI/CD pipelines. The subdirectory contains:
icrPlugin.hpi
: iCR supports Jenkins workflows which use a plugin to be inserted into workflows to trigger iCR. This file is the plugin which would be used with Jenkins.icr-gitlab.tar
: This is the file containing the Docker image to be executed by GitLab to start an analysis via a CI/CD pipeline in GitLab.icr-github.tar
: This is the file containing the Docker image to be executed by GitHub to start an analysis via a CI/CD pipeline in GitHub Actions.prep-container
: For simplicity and convenience, OpenRefactory provides a simple script to make it easier to prepare the iCR code for insertion into the GitLab and GitHub CI/CD container registries.gitlab-ci.yml
: When using a GitLab CI/CD pipeline, ayml
script is required in each desired repository to activate iCR when the pipeline is executed. This is the sample script to be inserted into the User’s repository to cause iCR to be correctly invoked.githubAction.yml
: When using a GitHub CI/CD pipeline, ayml
script is required in each desired repository to activate iCR when the pipeline is executed. This is the sample script to be inserted into the User’s repository to cause iCR to be correctly invoked.
How these files are used will be covered in each of the following sections dealing with CI/CD workflows for each supported system.
Last updated