-
Notifications
You must be signed in to change notification settings - Fork 2
/
azure-pipelines.yml
67 lines (55 loc) · 1.61 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
pool:
vmImage: 'ubuntu-latest'
steps:
- task: SonarQubePrepare@5
displayName: 'Prepare analysis on SonarQube'
inputs:
SonarQube: 'nhsuk-prototype-kit'
scannerMode: 'CLI'
configMode: 'manual'
cliProjectKey: 'nhsuk-prototype-kit'
extraProperties: |
sonar.javascript.lcov.reportPaths=coverage/lcov.info
- task: Npm@1
displayName: 'npm install'
inputs:
verbose: true
- task: Npm@1
displayName: 'npm run build'
inputs:
command: 'custom'
customCommand: run build
verbose: true
- task: Npm@1
displayName: 'npm run test'
inputs:
command: 'custom'
customCommand: run test
verbose: true
- task: dependency-check-build-task@6
displayName: 'Run OWASP Dependency Check'
inputs:
projectName: 'nhsuk-prototype-kit'
scanPath: '$(Build.SourcesDirectory)'
format: 'HTML, JUNIT'
reportsDirectory: '$(System.DefaultWorkingDirectory)/dependency-scan-results'
- task: PublishTestResults@2
displayName: 'Publish OWASP Dependency Check Results'
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '$(System.DefaultWorkingDirectory)/dependency-scan-results/*junit.xml'
testRunTitle: 'Dependency check'
searchFolder: '$(Common.TestResultsDirectory)'
- task: SonarQubeAnalyze@5
displayName: 'Run code analysis'
- task: SonarQubePublish@5
displayName: 'Publish quality gate result'
inputs:
pollingTimeoutSec: '300'
- task: ArchiveFiles@2
displayName: 'Archive files'
inputs:
rootFolderOrFile: '$(System.DefaultWorkingDirectory)'
includeRootFolder: false
- task: PublishBuildArtifacts@1
displayName: 'Publish artifacts: drop'