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:

  1. Create a vFunction Service account and a vFunction Yaml for use with Viper
  2. Log into Azure DevOps
  3. Navigate to the root of the repository
  4. Create a custom Pipeline after the Application has been built (post-build)
  5. 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:
trigger:
  branches: 
    include:
    - main
    exclude:
    - feature_branches
    
pool:
  vmImage: 'ubuntu-latest'

variables:
  - name: VF_HOST
    ### Modify VF_SERVER to the URL for your vFunction Server
    value: 'VF_SERVER'
  - name: VF_APPNAME
    ### Modify APPLICATION_NAME to match the name used in the VF Server UI of the Application
    value: 'APPLICATION_NAME'
  - name: VF_CONF
    ### Modify BASE_DIR to the path of the viper-conf.yaml
    value: 'BASE_DIR/viper-conf.yaml'
  - name: VF_USER
    ### Modify the SERVICE_ACCOUNT_ID with the username created in the VF Server UI
    value: 'SERVICE_ACCOUNT_ID'
  - name: VF_PASSWORD
    ### Modify the SERVICE_ACCOUNT_PASSWORD with the password created in the VF Server UI
    value: 'SERVICE_ACCOUNT_PASSWORD'

stages:
  - stage: vFunctionContinuousViper
    displayName: "Run Viper and Upload JSON to VF Server"
    jobs:
      - job: "Download Viper-CLI"
        steps:
          ### Modify VF_SERVER to the URL for your vFunction Server
          - script: curl -LO VF_SERVER/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