CI/CD Integration - Viper with Windows Image for Jenkins
Steps to create Pipeline
Take the following steps to configure vFunction Viper to analyze the application’s binaries in the Jenkins pipeline:
- Create a vFunction Service account and a vFunction Yaml for use with Viper
- Access the Jenkinsfile that declares the variables for the environment
- Create a custom Pipeline after the Application has been built (post-build)
- Add the vFunction variables VF_HOST, VF_APPNAME, VF_CONF, VF_USER, VF_PASSWORD to this pipeline. Add the vFunction script steps to this pipeline to download and run the vFunction Viper scripts:
### Find-and-replace "https://vfunction.organization.com" below with the address to your own VF Server
### Modify the VF_APPNAME value, VF_CONF value, VF_USER value, and VF_PASSWORD values
pipeline {
agent { label 'vfunctionContinuousViper'}
parameters {
string(name: 'VF_HOST', defaultValue: 'TEST')
string(name: 'VF_APPNAME', defaultValue: 'https://vfunction.organization.com')
string(name: 'VF_CONF', defaultValue: 'C:\path\to\vfunction\yaml\file\viper-conf.yaml')
string(name: 'VF_USER', defaultValue: 'vFunction-Service-Account-Id')
string(name: 'VF_PASSWORD', defaultValue: 'vFunction-Service-Account-Password')
}
stages {
stage('vfContinuousViper') {
steps {
container('windows') {
curl -LO https://vfunction.organization.com/downloads/vfunction-tools/viper-cli.zip
Expand-Archive -LiteralPath C:\vfunction\viper-cli.zip -DestinationPath C:\vfunction\
powershell C:\vfunction\viper-run-ci.ps1
}
}
}
}
}