CI/CD Integration - Viper with Linux Image for Azure DevOps
Steps to create Pipeline
Take the following steps to configure vFunction Viper to analyze the application’s binaries in the Azure DevOps pipeline:
- Create a vFunction Service account and a vFunction Yaml for use with Viper
- Log into Azure DevOps
- Navigate to the root of the repository
- 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
trigger:
branches:
include:
- main
exclude:
- feature_branches
pool:
vmImage: 'ubuntu-latest'
variables:
- name: VF_HOST
value: 'https://vfunction.organization.com'
- name: VF_APPNAME
value: 'TEST'
- name: VF_CONF
value: '/path/to/vfunction/yaml/file/viper-conf.yaml'
- name: VF_USER
value: 'vFunction-Service-Account-Id'
- name: VF_PASSWORD
value: 'vFunction-Service-Account-Password'
stages:
- stage: vFunctionContinuousViper
displayName: "Run Viper and Upload JSON to VF Server"
jobs:
- job: "Download Viper-CLI"
steps:
- script: curl -LO https://vfunction.organization.com/downloads/vfunction-tools/viper-cli.zip
- job: "Unzip Viper-CLI"
steps:
- script: jar -xvf viper-cli.zip
- job: "Create Full Graph JSON and upload to VF Server"
steps:
- script: bash viper-run-ci.sh