Integration with Azure Devops¶
This guide provides the steps for integrating Licensight into Azure Devops pipeline, including all required configurations.
Step 1: Configure variables¶
The build process requires configuration of the following variables. Please setup the following variables in the Azure pipeline library (or in organization level). Navigate to "Pipelines / Library" to create a new variable group or edit an existing one, then add the following variables:
Variable | Description |
---|---|
LICENSIGHT_APPLICATION_NAME |
The name of the application in Licensight platform. |
LICENSIGHT_ACCESS_TOKEN |
Your Licensight access token. Please refer to Creating an access token for detailed instructions. |
LICENSIGHT_URL |
Licensight platform endpoint |
Step 2: Adjust pipeline configuration¶
Navigate to "Pipelines" and edit the existing pipeline. Add the following stage.
For details on the parameters of Licensight Scan, refer to Using Licensight Scan.
...
stages:
- stage: 'licensight'
displayName: 'Licensight'
variables:
# The variable group in which you have added the required variables above.
- group: MyVariables
# The variable contains the branch name of the current run.
- name: BRANCH_NAME
value: $[replace(variables['Build.SourceBranch'], 'refs/heads/', '')]
jobs:
- job: Generate SBOM
steps:
- script: |
curl -O https://licensight.s3.eu-central-1.amazonaws.com/latest/linux/licensight-scan
chmod u+x ./licensight-scan
./licensight-scan generate -a $(LICENSIGHT_APPLICATION_NAME) -d . -e $(LICENSIGHT_URL) -at $(LICENSIGHT_ACCESS_TOKEN) -b $(BRANCH_NAME)
...