Azure Pipelines Integration

Introduction

Azure Pipelines combines continuous integration (CI) and continuous delivery (CD) to test, build and ship your code to any target.

The following configuration examples show how to install & run the scanner using an API Token stored as a secret named XYGENI_TOKEN. See Generate Xygeni API Token for Scanner or ask your Xygeni administrator to generate it.

For registering a new secret in Azure DevOps, see Secret variables.

Using the installation script

You may automatically install the scanner using the installation script available from https://get.xygeni.io/latest/scanner/TYPE, with TYPE either bash or powershell:

steps:
- task: Bash@3
  displayName: 'Install xygeni scanner'
  inputs:
    targetType: 'inline'
    script: >
      curl -L https://get.xygeni.io/latest/scanner/install.sh |
      /bin/bash -s -- -o -t $(XYGENI_TOKEN) 
  env:
    XYGENI_TOKEN: $(xygeniToken)

- task: Bash@3
  displayName: 'Scan for issues'
  inputs:
    targetType: 'inline'
    script: >
      $HOME/xygeni_scanner/xygeni scan
      -n $(PROJECT_NAME) --dir $(PROJECT_HOME)
  env:
    PROJECT_NAME: $(projectName)
    PROJECT_HOME: $(projectHome)

See installation script for more details.

Please refer to the scanner documentation for full details on the scanner command line options and configuration.

Last updated