Skip to content

Running Fixinator on Azure DevOps Pipelines or TFS

Pete Freitag edited this page Jun 13, 2019 · 1 revision

Instructions for running Fixinator automatically every time you commit code to an Azure DevOps Git repository or Microsoft Team Foundation Server (TFS). Azure DevOps also allows you to connect to any Git or Subversion repositories, and supports native integration for GitHub, BitBucket, Azure DevOps Repositories.

running fixinator on Azure DevOps

Step 1 - Create an azure-pipeline.yml file

Add a file in the root of your repository called azure-pipeline.yml

  vmImage: 'ubuntu-16.04'

- script: |
    echo Starting the build
    curl --location -o /tmp/
    unzip /tmp/ -d /tmp/
    chmod a+x /tmp/box
    /tmp/box install fixinator
    mkdir /tmp/results/
    /tmp/box fixinator path=. confidence=high resultFormat=junit resultFile=fixinator-results.xml failOnIssues=false
  displayName: 'Fixinator Scan'
- task: PublishTestResults@2
    testResultsFormat: 'JUnit'
    testResultsFiles: '**/fixinator-*.xml' 
    testRunTitle: Fixinator Security Scan
    failTaskOnFailedTests: true
  displayName: 'Fixinator Scan Results'

After you commit this file, a Pipeline should be created for you.

Step 2 - Add FIXINATOR_API_KEY Variable

Click on Pipelines from the navigation menu in Azure DevOps / TFS, then click the Edit button. Click the hamburger menu next to the Run button and select Variables

Click Add and add a variable called FIXINATOR_API_KEY then specify the value. Click the Lock icon to make it a secure variable.

Select Save and Queue and your built will start running.

fixinator test results on Azure DevOps