Jenkins Integration
Introduction
Jenkins is an open source automation server that helps you to automate the parts of software development related to building, testing, and deploying, facilitating continuous integration and continuous delivery.
Using the xygeni-scanner.zip
Replace <PROJECT_NAME> for the name of the project that you want to create in Xygeni.
pipeline {
agent any
environment {
XYGENI_TOKEN = credentials('XYGENI_TOKEN')
}
stages {
stage('Install Xygeni scanner') {
steps {
sh '''
curl -s -L "https://get.xygeni.io/latest/scanner/xygeni-release.zip" -o xygeni_scanner.zip
unzip -qq xygeni_scanner.zip -d "${WORKSPACE}"
rm xygeni_scanner.zip
'''
}
}
stage('Scan for issues') {
steps {
sh '''
set -x # Activate debug mode to print commands inside the script
$WORKSPACE/scanner/xygeni scan \
-n <PROJECT_NAME> \
--dir ${WORKSPACE}
'''
}
}
}
}Using the docker image
If it is not possible to install the scanner in the Jenkins host running the pipeline, you may run the docker image instead.
Replace <PROJECT_NAME> for the name of the project that you want to create in Xygeni.
Last updated

