Skip to content

Commit 19acbe4

Browse files
committed
Set up Sonar with Azure Pipelines for Trados Transcreate
[skip ci]
1 parent 661a48a commit 19acbe4

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

build/Transcreate_Sonar.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
trigger:
2+
branches:
3+
include:
4+
- master
5+
paths:
6+
include:
7+
- Trados Transcreate/*
8+
9+
pr:
10+
branches:
11+
include:
12+
- master
13+
paths:
14+
include:
15+
- Trados Transcreate/*
16+
17+
variables:
18+
- group: 'Trados Transcreate Sonar Version'
19+
- template: jobs/branch-variables.yml
20+
- name: buildPlatform
21+
value: 'Any CPU'
22+
- name: buildConfiguration
23+
value: 'Release'
24+
- name: pathToPublish
25+
value: '$(PluginPath)\Trados.Transcreate.sdlplugin'
26+
- name: solution
27+
value: '**/SDLTranscreate.sln'
28+
- name : SonarID
29+
value : Trados_Transcreate
30+
- name : SonarName
31+
value : 'Trados Transcreate'
32+
- name : ProjectVersion
33+
value : $[counter(variables['Version.Patch'], 1)]
34+
35+
pool:
36+
vmImage: '$(DefaultBuildVm)'
37+
38+
steps:
39+
- task: SonarCloudPrepare@3
40+
inputs:
41+
SonarCloud: 'AppStorePlugins-ServiceConnection'
42+
organization: 'sdl'
43+
scannerMode: 'dotnet'
44+
projectKey: $(SonarId)
45+
projectName: $(SonarName)
46+
projectVersion: $(ProjectVersion)
47+
48+
- template: jobs/build-sdlplugin.yml
49+
- task: SonarCloudAnalyze@3
50+
displayName: 'Run Code Analysis'
51+
52+
- task: SonarCloudPublish@3
53+
inputs:
54+
pollingTimeoutSec: '300'
55+
displayName: 'Publish Quality Gate Result'
56+
57+
- template: jobs/publish-build-artifact-task.yml

0 commit comments

Comments
 (0)