Docs
relyance.ai ↗
Browse docs

Azure Pipelines

Updated October 13, 2025View as Markdown ↗

Azure_pipelines-logo.png Azure Pipelines is a cloud CI/CD service that is used to automatically build and test code projects. It combines continuous integration (CI) and continuous delivery (CD) to test and build your code and ship it to any target.

This how-to will provide a basic understanding of how add the Relyance Source Code inspector (SCI) into a typical build job.

Prerequisites:

  1. A source code repository needs to be available.
  2. The relyance.yaml file needs to be in the source code root directory.
  3. Docker needs to be available in the scanning environment.
  4. Follow Set up SCI to create an OAuth credential and copy the Docker command from Step 2. Save the credential as the secret pipeline variable SCI_API_KEY. The scan task maps it to API_KEY. Set the pipeline variable SCI_IMAGE to the full image reference shown at the end of that command.
Tip

See more info about the SCI commands here.

Steps:

  1. Login to your Azure DevOps account.
  2. Go to your project or create a new one.
  3. Click on Pipelines in the left-hand navigation menu.
  4. Click the New pipeline button in the upper right-hand corner. Tip: It is recommended to create a new pipeline in order not to impact other CI/CD build functions.
    Azure-1.png
  5. Choose the source code repository you will be scanning.
  6. Click on the Empty job link to start without a template.
  7. Ensure your job Agent has Docker installed. Tip: It is recommended to use a Linux environment for either the private or hosted job agents.
    Azure-2.png
  8. At this point, if your source code needs to be built, run your build commands before doing the Relyance scan.
  9. Click the + beside the agent name and add the Command line task.
    Azure-3.png
  10. Add the Docker command to the task and map the secret pipeline variable to API_KEY.
  11. The entire Azure Pipelines YAML file should look something like this:
pool:
  vmImage: ubuntu-latest
steps:
  - bash: |
      docker run --pull=always --rm --env API_KEY --volume "$PWD:/repo:ro" "$SCI_IMAGE"
    displayName: Run Relyance SCI
    env:
      API_KEY: $(SCI_API_KEY)
      SCI_IMAGE: $(SCI_IMAGE)
  1. Once done, click on the Save & queue dropdown and select Save.
  2. Click Queue to run the pipeline.
  3. If there are no errors, you should start to see SCI results in your Relyance tenant.

Appendix:

Run the command from the repository root with the scan job's API_KEY environment variable and the image from Step 2.

docker run --pull=always --rm --env API_KEY --volume "$PWD:/repo:ro" "$SCI_IMAGE"