forked from solidify/jira-azuredevops-migrator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
155 lines (134 loc) · 4.86 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
resources:
- repo: self
pool:
vmimage: windows-2019
variables:
BuildPlatform: 'any cpu'
BuildConfiguration: 'release'
major: 3
minor: 0
dotNetVersion: '3.1.x'
name: $(major).$(minor)$(rev:.r)
trigger:
branches:
include:
- master
pr:
- master
steps:
- task: richardfennellBM.BM-VSTS-Versioning-Task.Version-Assemblies-Task.VersionAssemblies@2
displayName: 'Version Assemblies'
inputs:
VersionRegex: '\d+\.\d+\.\d+'
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: '$(dotNetVersion)'
- task: NuGetCommand@2
displayName: 'NuGet restore'
inputs:
restoreSolution: '**\*.sln'
- task: SonarCloudPrepare@1
displayName: 'Prepare analysis on SonarCloud'
inputs:
SonarCloud: SonarCloud
organization: solidify
projectKey: 'jira-azuredevops-migrator'
projectName: 'jira-azuredevops-migrator'
projectVersion: '$(Build.BuildNumber)'
- task: VSBuild@1
displayName: 'Build solution WorkItemMigrator'
inputs:
solution: src/WorkItemMigrator/WorkItemMigrator.sln
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
- task: SonarCloudAnalyze@1
displayName: 'Run Code Analysis'
- task: SonarCloudPublish@1
displayName: 'Publish Quality Gate Result'
inputs:
pollingTimeoutSec: '300'
- task: DotNetCoreCLI@2
displayName: 'Run Tests'
inputs:
command: test
projects: '**/*tests/*.tests.csproj'
arguments: '--configuration $(BuildConfiguration)'
- task: TfxInstaller@3
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
inputs:
version: 'v0.11.x'
- task: PackageAzureDevOpsExtension@3
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
displayName: 'Package Extension: src/WorkItemMigrator.Extension'
inputs:
rootFolder: 'src/WorkItemMigrator.Extension'
outputPath: '$(Build.ArtifactStagingDirectory)\jira-devops-workitem-migrator-$(Build.BuildNumber).vsix'
updateTasksVersion: false
bypassLocalValidation: true
- task: CopyFiles@2
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
displayName: 'Copy JiraExport files'
inputs:
SourceFolder: '$(system.defaultworkingdirectory)\src\WorkItemMigrator\JiraExport\bin\$(BuildConfiguration)'
Contents: |
ApplicationInsights.config
Atlassian.Jira.dll
jira-export.exe
jira-export.exe.config
Microsoft.AI.Agent.Intercept.dll
Microsoft.AI.DependencyCollector.dll
Microsoft.ApplicationInsights.dll
Microsoft.Extensions.CommandLineUtils.dll
Migration.Common.dll
Migration.Common.Log.dll
Migration.WIContract.dll
Newtonsoft.Json.dll
RestSharp.dll
Semver.dll
System.Diagnostics.DiagnosticSource.dll
TargetFolder: '$(build.artifactstagingdirectory)\WorkItemMigrator'
flattenFolders: true
- task: CopyFiles@2
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
displayName: 'Copy WorkItemImport files'
inputs:
SourceFolder: '$(system.defaultworkingdirectory)\src\WorkItemMigrator\WorkItemImport\bin\$(BuildConfiguration)'
Contents: |
Microsoft.TeamFoundation.Client.dll
Microsoft.TeamFoundation.Common.dll
Microsoft.TeamFoundation.Core.WebApi.dll
Microsoft.TeamFoundation.SourceControl.WebApi.dll
Microsoft.TeamFoundation.WorkItemTracking.Client.DataStoreLoader.dll
Microsoft.TeamFoundation.WorkItemTracking.Client.dll
Microsoft.TeamFoundation.WorkItemTracking.Common.dll
Microsoft.TeamFoundation.WorkItemTracking.Proxy.dll
Microsoft.TeamFoundation.WorkItemTracking.WebApi.dll
Microsoft.VisualStudio.Services.Common.dll
Microsoft.VisualStudio.Services.WebApi.dll
Microsoft.WITDataStore32.dll
System.Net.Http.dll
System.Net.Http.Formatting.dll
wi-import.exe
wi-import.exe.config
TargetFolder: '$(build.artifactstagingdirectory)\WorkItemMigrator'
flattenFolders: true
- task: CopyFiles@2
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
displayName: 'Copy sample files'
inputs:
SourceFolder: '$(system.defaultworkingdirectory)\docs\samples'
TargetFolder: '$(build.artifactstagingdirectory)\WorkItemMigrator\Samples'
flattenFolders: true
- task: PublishBuildArtifacts@1
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
displayName: 'Publish Artifact: WorkItemMigrator'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)\WorkItemMigrator'
ArtifactName: WorkItemMigrator
- task: PublishBuildArtifacts@1
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
displayName: 'Publish Artifact: WorkItemMigratorExtension'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)\jira-devops-workitem-migrator-$(Build.BuildNumber).vsix'
ArtifactName: WorkItemMigratorExtension