Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

...

The below integration uses environment variables to configure the Unified Agent so that the default configuration values are used.

For more information, see the following articles
Getting Started with the Unified Agent
https://whitesource.atlassian.net/wiki/spaces/WD/pages/1544880156/Unified+Agent+Configuration+Parameters#Configuring-the-Unified-Agent-by-Environment-Variables

...

  1. In the Where is your code? screen, select a YAML-enabled option.

  2. In the Select a repository screen, select your repository.

  3. In Configure your pipeline, select the relevant pipeline configuration.

  4. In Review your pipeline YAML, add the following text as a post-build step. This activates the WhiteSource Mend integration on your build pipeline.

    Code Block
    languageyaml
    - script: |
        curl -LJO https://unified-agent.s3.amazonaws.com/wss-unified-agent.jar
        echo Unified Agent downloaded successfully
        java -jar wss-unified-agent.jar
      env:
        WS_APIKEY: $(APIKEY)
        WS_USERKEY: $(USERKEY)
        WS_WSS_URL: $(WSS_URL)
        WS_PRODUCTNAME: AZDO_$(System.TeamProject)
        WS_PROJECTNAME: $(Build.Repository.Name)_$(Build.SourceBranchName)
      displayName: 'WhiteSourceMend Unified Agent Scan'
  5. Add environment variables for APIKEY, USERKEY, and WSS_URL, as described by the Microsoft documentation, https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch

  6. Click Save and run.

...

  1. Select the type of repository:

  2. Select an Empty job:

  3. Enter a name for the job and select an Agent pool:

  4. Add the relevant build task (Maven, npm, Gradle, .NET Core, etc.).

  5. Add a Command Line task and update the following fields to activate the WhiteSource Mend integration on your build pipeline.

    • Display name: WhiteSource Mend Unified Agent Scan

    • Script:

      Code Block
      languageyaml
      curl -LJO https://unified-agent.s3.amazonaws.com/wss-unified-agent.jar
      echo Unified Agent downloaded successfully
      java -jar wss-unified-agent.jar
    • Environment Variables:

      • WS_APIKEY: your-apiKey

      • WS_USERKEY: your-userKey

      • WS_WSS_URL: your-wssUrl

      • WS_PRODUCTNAME: AZDO_$(System.TeamProject)

      • WS_PROJECTNAME: $(Build.Repository.Name)_$(Build.SourceBranchName)

  6. Click Save& queue.