-
Notifications
You must be signed in to change notification settings - Fork 6
/
azure-pipelines.yml
44 lines (43 loc) · 1.46 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
trigger:
- master
- develop
pool:
vmImage: 'ubuntu-latest'
steps:
- task: SonarCloudPrepare@1
inputs:
SonarCloud: 'philips-software Sonarqube'
organization: 'philips-software'
scannerMode: 'CLI'
configMode: 'manual'
cliProjectKey: 'logproxy'
cliProjectName: 'logproxy'
cliSources: '.'
extraProperties: 'sonar.exclusions=**/*_test.go,**/vendor/**
sonar.tests=.
sonar.test.inclusions=**/*_test.go
sonar.test.exclusions=**/vendor/**
sonar.go.coverage.reportPaths=$(System.DefaultWorkingDirectory)/build/coverage.out'
- script: |
docker build --tag 'logproxy-builder:latest' --file Dockerfile.build .
docker run --rm -v `pwd`:/src logproxy-builder:latest
displayName: Build and Test logproxy executable
workingDirectory: $(System.DefaultWorkingDirectory)
- task: PublishTestResults@2
displayName: 'Publish Test Results **/TEST-*.xml'
inputs:
mergeTestResults: true
testRunTitle: 'logproxy-unit-tests'
- task: SonarCloudAnalyze@1
displayName: Run Sonarqube Code Analysis
- task: SonarCloudPublish@1
displayName: Publish Sonarqube Analysis results
- task: PublishCodeCoverageResults@1
displayName: 'Publish Code Coverage Results'
inputs:
codeCoverageTool: 'Cobertura'
summaryFileLocation: $(System.DefaultWorkingDirectory)/build/coverage-cobertura.xml
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
PathtoPublish: '$(System.DefaultWorkingDirectory)/build'