Running Fixinator on Azure DevOps Pipelines or TFS - foundeo/fixinator GitHub Wiki

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

pool:
  vmImage: 'ubuntu-16.04'

steps:
- script: |
    echo Starting the build
    curl --location -o /tmp/box.zip https://www.ortussolutions.com/parent/download/commandbox/type/bin
    unzip /tmp/box.zip -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'
  env:
      FIXINATOR_API_KEY: $(FIXINATOR_API_KEY)
- task: PublishTestResults@2
  inputs:
    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