Integration with GitLab Continuous Integration
What does the plugin do?
Kiuwan provides integration with GitLab.
GitLab is a powerful tool for software development, security, and operations that enables concurrent DevOps, making the software lifecycle faster.
The Kiuwan analysis will be executed by a gitlab runner.
How to use it?
To run a Kiuwan analysis, it is needed to follow the next steps:
1. Insert or add a Kiuwan step in the YAML definition
In the project home it is needed to add a YAML file with the steps to invoke Kiuwan:
The next code example shows a very simple case with a Maven step and a Kiuwan baseline analysis:
2. Install Kiuwan Local Analyzer in the runner machine
As we can see in the previous example the call to Kiuwan is through a command line.
To do that go to kiuwan.com, log in, and in the user options download the Kiuwan Local Analyzer:
In addition, it is needed to add the folder: KLA_HOME/bin to the environment variable PATH.
3. Define credentials as secret variables
Kiuwan credentials should be added as secret variables. These variables will be applied to environments via the runner.
To add the variables go to Settings -> CI/CD menu and clicking on Expand and add both variables.
4. Perform an analysis
To perform a Kiuwan analysis we need to install a gitlab runner (local agent) that will be the responsible to execute the steps of the pipeline.
To install a gitlab runner we could follow next instructions:
When we create the agent it is necessary to specify the tags of the steps we want to analyze with the runner.
In the previous example tags are maven,kiuwan:
Once we have done it, we could perform an analysis in the pipeline screen in order to test the configuration.