Share this page

# Azure DevOps integration

Integrate Azure DevOps with OpenText Software Delivery Management to run pipelines, inject test results, and upload code coverage data from pipeline execution.

In this topic:

## Set up the Azure DevOps extension

The Azure DevOps extension integration supports Azure DevOps Server 2019 and later, and Azure DevOps Services.

To set up the Azure DevOps extension in Azure DevOps:

1. In Azure DevOps, install the Integration Extension plugin.

2. Enable the Pipeline Decorators preview feature.

3. In the target Azure DevOps project, create a new OpenText Software Delivery Management service connection by providing the properties of your workspace: connection name, URL, instance ID, shared space ID, API client ID, and client secret.

4. Add two jobs to your pipeline: AlmOctanePipelineStart, which always runs at the beginning of the pipeline, and AlmOctanePipelineEnd, which always waits until all other jobs finish.

For implementation details, see the extension readme.

## Discover Azure DevOps pipelines

This section describes the steps that admins need to do for integrating with Azure DevOps. The setup includes the Azure DevOps token and a DevOps CI server entry.

Note: The integration requires two-way communication. If you have an off-cloud deployment of OpenText Software Delivery Management that you need to integrate with the Azure DevOps cloud service, make sure that the Azure DevOps agent can access OpenText Software Delivery Management, and that OpenText Software Delivery Management can access the Azure DevOps cloud service.

To avoid connection and permission issues, we recommend that you configure OpenText Software Delivery Management off-cloud deployments to communicate with an off-cloud Azure DevOps server.

To discover Azure DevOps pipelines:

1. In Azure project settings > Pipeline settings, set Limit variables that can be set at queue time to OFF.

2. By default, you cannot set the following required variables as parameters or variables in yaml: executionId, suiteId, octaneTestRunnerFramework, octaneSpaceId, octaneEnvironment, suiteRunId, octaneWorkspaceId, octaneRunByUsername.

   Set these as editor variables by editing the pipeline in Azure DevOps. Select Settable at queue time on the pipeline editor Variables tab.

3. Make sure that you have the latest Azure DevOps OpenText Software Delivery Management extension installed. If your version is outdated, when a user tries to run the pipeline, a message opens listing the required version. For Azure DevOps-side setup details, see Set up the Azure DevOps extension.

4. Create a test suite and tests in OpenText Software Delivery Management. These can be created with pipeline injection.

   Note: To enable BDD test result injection, use the CucumberReportPath parameter to configure the path from which the Azure DevOps integration can take BDD test results, after they are processed by the bdd2octane tool. The path should be the output folder that contains the test results generated by the tool. For details, see BDD testing framework.

5. Add credentials:

   1. Create a token in Azure DevOps.

   2. Open the global menu and select Administration > General Settings.

   3. Select a shared space or workspace.

   4. Select the Credentials tab and click + Credentials to add a new credential.

   5. Enter arbitrary text in the Name and User Name fields.

   6. For the password, enter the Azure token. For details, see Credentials.

   7. Click Add.

6. Add the CI server:

   1. Open the global menu and select Administration > General Settings.

   2. Select a shared space or workspace.

   3. Select the DevOps tab and click + CI Server to add a new CI server.

   4. Add the server information for Azure DevOps and select the credential that you created above. This requires the following:

      1. Click the Choose columns button and add the Credential column.

      2. Under your connection, select the Credential column check box.

   5. Click Add. Users can now run Azure DevOps pipelines. For details, see Run Azure DevOps pipelines.

## Configure JaCoCo and LCOV coverage injection

JaCoCo and LCOV generate coverage reports as part of test execution. The integration retrieves these reports from pipeline artifacts and sends the data to OpenText Software Delivery Management. Coverage injection is triggered by the octane-end-task. Set the CodeCoverageType input to JACOCOXML for JaCoCo or LCOV for LCOV.

To configure JaCoCo or LCOV coverage injection:

1. In your pipeline, publish the coverage report as a build artifact using the PublishBuildArtifacts task. Specify the path to the generated report file and set the artifact name to coverage-report. This name is required by the integration to locate the coverage artifact.

   Copy code
   Example: Publish JaCoCo report as pipeline artifact

       - task: PublishBuildArtifacts@1
         inputs:
           PathtoPublish: '$(System.DefaultWorkingDirectory)/target/site/jacoco/jacoco.xml'
           ArtifactName: 'coverage'

   For LCOV, set PathtoPublish to the .info file generated by your coverage tool.

2. On the octane-end-task, set CodeCoverageType to JACOCOXML for JaCoCo, or LCOV for LCOV.

   Copy code
   Example: octane-end-task with JaCoCo

       - task: octane-end-task-private@2
         inputs:
           OctaneServiceConnection: 'octanePrivateServiceConnection'
           WorkspaceList: '3001'
           Framework: 'junit'
           CodeCoverageType: 'JACOCOXML'

## Configure SonarQube coverage injection

SonarQube integrates with coverage tools such as JaCoCo to aggregate and display coverage metrics. The OpenText Software Delivery Management integration reads coverage results from the SonarQube API after analysis completes. The integration does not trigger the SonarQube scan. You are responsible for configuring the SonarQube analysis tasks appropriate for your technology stack. Set the CodeCoverageType input on the octane-end-task to SONARQUBE.

To configure SonarQube coverage injection:

1. In your pipeline, configure the SonarQubePrepare task and include the sonar.projectKey for your project in extraProperties. This key is required for the integration to identify the correct project when retrieving coverage data from the SonarQube API.

   Copy code
   Example: SonarQubePrepare with project key

       - task: SonarQubePrepare@8
         inputs:
           SonarQube: 'sonarServiceConnectionName'
           scannerMode: 'other'
           extraProperties: |
             sonar.coverage.exclusions=**/MyApplication.java
             sonar.projectKey=org.example:my_project

   The SonarQube input references a SonarQube service connection configured in your Azure DevOps project settings, providing the SonarQube server URL and a user token.

2. On the octane-end-task, set CodeCoverageType to SONARQUBE and set SonarQubeServiceConnection to the name of the SonarQube service connection used in step 1. The task uses this connection to authenticate with the SonarQube API and retrieve coverage results after the analysis completes.

   Copy code
   Example: octane-end-task with SonarQube

       - task: octane-end-task-private@2
         inputs:
           OctaneServiceConnection: 'octanePrivateServiceConnection'
           WorkspaceList: '3001'
           Framework: 'junit'
           CodeCoverageType: 'SONARQUBE'
           SonarQubeServiceConnection: 'sonarServiceConnectionName'

## Next steps

- Create and configure pipelines

https://admhelp.microfocus.com Software Delivery Management 8942
Tips to improve your search results... OpenText™ Software Delivery Management Help Center OpenText™ Software Delivery Management Help 26.3 All View Local Help Center View Online Help Center Version: