-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-build-pipeline.yaml
92 lines (82 loc) · 2.97 KB
/
azure-build-pipeline.yaml
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
resources:
repositories:
- repository: AzurePipelines
type: github
endpoint: loopup
name: loopup/azure-pipelines
name: $(Date:yyyyMMdd)$(Rev:.r)
pr: none
pool:
vmImage: 'windows-2019'
parameters:
- name: forceContinuation
displayName: Force a continuation to release? (This should only be used in an emergency)
type: boolean
default: false
stages:
- stage: 'BuildLintTest'
displayName: 'Build, lint & test'
jobs:
- template: ./lint-commit-messages.yml@AzurePipelines
parameters:
lintCommitFrom: '65025b25a8271593464a6317648ad7925958513a'
- template: ./lint-and-test.yml@AzurePipelines
parameters:
testProjects:
[
"./Siesta.Client.Tests/Siesta.Client.Tests.csproj",
"./Siesta.Configuration.Tests/Siesta.Configuration.Tests.csproj",
]
sonarcloudProjectKey: 'loopup_siesta'
- template: ./generate-prerelease-nuget-package-artifacts.yml@AzurePipelines
parameters:
artifactName: PrereleasePackages
pathToProjectContainingVersion: ./Siesta.Client/Siesta.Client.csproj
- template: ./generate-nuget-package-artifacts.yml@AzurePipelines
parameters:
artifactName: 'ProductionPackages'
- stage: 'IncrementVersion'
displayName: 'Increment version'
dependsOn: 'BuildLintTest'
condition: succeeded()
jobs:
- template: ./increment-version.yml@AzurePipelines
parameters:
releaseBranch: main
- template: ./v2/stages/evaluate-cicd-continuation.yml@AzurePipelines
parameters:
stageName: 'EvaluateCICDContinuation'
dependsOn: 'BuildLintTest'
branchToContinue: 'main'
commitFormatToContinue: 'chore(release):'
forceContinuation: ${{ parameters.forceContinuation }}
- stage: 'ReleasePrereleasePackages'
displayName: 'Release prerelease packages'
dependsOn: 'EvaluateCICDContinuation'
jobs:
- deployment: 'PrereleasePackages'
environment: 'Prerelease'
strategy:
runOnce:
deploy:
steps:
- task: NuGetCommand@2
inputs:
command: custom
arguments: push $(Pipeline.Workspace)/PrereleasePackages/**/*.nupkg -ApiKey $(NUGET_API_KEY) -Source https://api.nuget.org/v3/index.json
allowPackageConflicts: false
- stage: 'ReleaseProductionPackages'
displayName: 'Release production packages'
dependsOn: 'EvaluateCICDContinuation'
jobs:
- deployment: 'PrereleasePackages'
environment: 'Release'
strategy:
runOnce:
deploy:
steps:
- task: NuGetCommand@2
inputs:
command: custom
arguments: push $(Pipeline.Workspace)/ProductionPackages/**/*.nupkg -ApiKey $(NUGET_API_KEY) -Source https://api.nuget.org/v3/index.json
allowPackageConflicts: false