|
2 | 2 | vmImage: 'ubuntu-latest' |
3 | 3 |
|
4 | 4 | steps: |
5 | | -- task: SonarCloudPrepare@1 |
6 | | - inputs: |
7 | | - SonarCloud: 'SonarCloud' |
8 | | - organization: 'nhsdigital' |
9 | | - scannerMode: 'CLI' |
10 | | - configMode: 'file' |
11 | | - extraProperties: | |
12 | | - sonar.javascript.lcov.reportPaths=coverage/lcov.info |
13 | | - sonar.language=js |
14 | | - sonar.projectKey=nhsuk-prototype-kit |
15 | | - sonar.sourceEncoding=UTF-8 |
16 | | -
|
17 | | -- task: Npm@1 |
18 | | - displayName: 'npm install' |
19 | | - inputs: |
20 | | - verbose: true |
21 | | - |
22 | | -- task: Npm@1 |
23 | | - displayName: 'npm run build' |
24 | | - inputs: |
25 | | - command: 'custom' |
26 | | - customCommand: run build |
27 | | - verbose: true |
28 | | - |
29 | | -- task: Npm@1 |
30 | | - displayName: 'npm run test' |
31 | | - inputs: |
32 | | - command: 'custom' |
33 | | - customCommand: run test |
34 | | - verbose: true |
35 | | - |
36 | | -- task: SonarCloudAnalyze@1 |
37 | | - inputs: |
38 | | - jdkversion: 'JAVA_HOME_17_X64' |
39 | | - displayName: 'Run SonarCloud Code Analysis' |
40 | | - |
41 | | -- task: SonarCloudPublish@1 |
42 | | - displayName: 'Publish Quality Gate Result' |
43 | | - |
44 | | -- task: sonarcloud-buildbreaker@2 |
45 | | - displayName: "Break the build if the quality gate fails" |
46 | | - inputs: |
47 | | - SonarCloud: 'SonarCloud' |
48 | | - organization: 'nhsdigital' |
49 | | - |
50 | | -- task: ArchiveFiles@2 |
51 | | - displayName: 'Archive files' |
52 | | - inputs: |
53 | | - rootFolderOrFile: '$(System.DefaultWorkingDirectory)' |
54 | | - |
55 | | - includeRootFolder: false |
56 | | - |
57 | | -- task: PublishBuildArtifacts@1 |
58 | | - displayName: 'Publish artifacts: drop' |
| 5 | + - task: SonarCloudPrepare@1 |
| 6 | + inputs: |
| 7 | + SonarCloud: 'SonarCloud' |
| 8 | + organization: 'nhsdigital' |
| 9 | + scannerMode: 'CLI' |
| 10 | + configMode: 'file' |
| 11 | + extraProperties: | |
| 12 | + sonar.javascript.lcov.reportPaths=coverage/lcov.info |
| 13 | + sonar.language=js |
| 14 | + sonar.projectKey=nhsuk-prototype-kit |
| 15 | + sonar.sourceEncoding=UTF-8 |
| 16 | +
|
| 17 | + - task: Npm@1 |
| 18 | + displayName: 'npm install' |
| 19 | + inputs: |
| 20 | + verbose: true |
| 21 | + |
| 22 | + - task: Npm@1 |
| 23 | + displayName: 'npm run build' |
| 24 | + inputs: |
| 25 | + command: 'custom' |
| 26 | + customCommand: run build |
| 27 | + verbose: true |
| 28 | + |
| 29 | + - task: Npm@1 |
| 30 | + displayName: 'npm run test' |
| 31 | + inputs: |
| 32 | + command: 'custom' |
| 33 | + customCommand: run test |
| 34 | + verbose: true |
| 35 | + |
| 36 | + - task: SonarCloudAnalyze@1 |
| 37 | + inputs: |
| 38 | + jdkversion: 'JAVA_HOME_17_X64' |
| 39 | + displayName: 'Run SonarCloud Code Analysis' |
| 40 | + |
| 41 | + - task: SonarCloudPublish@1 |
| 42 | + displayName: 'Publish Quality Gate Result' |
| 43 | + |
| 44 | + - task: sonarcloud-buildbreaker@2 |
| 45 | + displayName: 'Break the build if the quality gate fails' |
| 46 | + inputs: |
| 47 | + SonarCloud: 'SonarCloud' |
| 48 | + organization: 'nhsdigital' |
| 49 | + |
| 50 | + - task: ArchiveFiles@2 |
| 51 | + displayName: 'Archive files' |
| 52 | + inputs: |
| 53 | + rootFolderOrFile: '$(System.DefaultWorkingDirectory)' |
| 54 | + |
| 55 | + includeRootFolder: false |
| 56 | + |
| 57 | + - task: PublishBuildArtifacts@1 |
| 58 | + displayName: 'Publish artifacts: drop' |
0 commit comments