CI/CD Integration - Viper with Windows Image for Azure Devops
Steps to create Pipeline
Take the following steps to configure vFunction Viper to analyze the application’s assemblies 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: 'windows-latest'
variables:
- name: VF_HOST
value: 'https://vfunction.organization.com'
- name: VF_APPNAME
value: 'TEST'
- name: VF_CONF
value: 'C:\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: Expand-Archive -LiteralPath viper-cli.zip -DestinationPath C:\vfunction\
- job: "Create Full Graph JSON and upload to VF Server"
steps:
- script: powershell C:\vfunction\viper-run-ci.ps1