Skip to content

Commit 13926f7

Browse files
committed
Set up Sonar with Azure Pipelines for Amazon Translate MT provider
[skip ci]
1 parent f38606c commit 13926f7

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed
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+
- Amazon Translate MT provider/*
8+
9+
pr:
10+
branches:
11+
include:
12+
- master
13+
paths:
14+
include:
15+
- Amazon Translate MT provider/*
16+
17+
variables:
18+
- group: 'Amazon Translate MT provider 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)\Sdl.Community.AmazonTranslateTradosPlugin.sdlplugin'
26+
- name: solution
27+
value: '**/AmazonTranslateTradosPlugin.sln'
28+
- name : SonarID
29+
value : Amazon_Translate_MT_provider
30+
- name : SonarName
31+
value : 'Amazon Translate MT provider'
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)