forked from Azure/azure-functions-rabbitmq-extension
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
174 lines (168 loc) · 6.09 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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
pr:
branches:
include:
- dev
- release/*
trigger:
branches:
include:
- dev
- release/*
jobs:
- job: InitializePipeline
pool:
vmImage: 'vs2017-win2016'
steps:
- task: PowerShell@2
displayName: 'Initialize'
name: Initialize
inputs:
filePath: '$(Build.Repository.LocalPath)\build\initialize-pipeline.ps1'
arguments: '-versionPath ''$(Build.Repository.LocalPath)\src'' -javaPath ''$(Build.Repository.LocalPath)\binding-library\java'''
- job: MvnBuild
dependsOn: InitializePipeline
condition: ne(dependencies.InitializePipeline.outputs['Initialize.BuildArtifacts'], true)
variables:
mvnPrefix: $[dependencies.InitializePipeline.outputs['Initialize.MvnPackagePrefix']]
mvnVersion: $[dependencies.InitializePipeline.outputs['Initialize.MvnPackageVersion']]
pool:
vmImage: 'vs2017-win2016'
steps:
- task: PowerShell@2
displayName: 'Mvn build'
name: MvnBuild
inputs:
filePath: '$(Build.Repository.LocalPath)\build\MvnBuildAndPackage.ps1'
arguments: '-mvnPrefix ''$(mvnPrefix)'' -mvnVersion ''$(mvnVersion)'''
- job: BuildArtifacts
dependsOn:
- InitializePipeline
condition: and(succeeded(), or(ne(variables['Build.Reason'], 'PullRequest'), eq(dependencies.InitializePipeline.outputs['Initialize.BuildArtifacts'], true)))
variables:
releaseVersionNumber: $[dependencies.InitializePipeline.outputs['Initialize.BuildNumber']]
mvnPrefix: $[dependencies.InitializePipeline.outputs['Initialize.MvnPackagePrefix']]
buildCounter: $[counter(variables['releaseVersionNumber'], 1)]
mvnVersion: $[dependencies.InitializePipeline.outputs['Initialize.MvnPackageVersion']]
pool:
vmImage: 'vs2017-win2016'
steps:
- task: PowerShell@2
displayName: 'VersioningAndSigning'
name: 'VersioningAndSigning'
inputs:
filePath: '$(Build.Repository.LocalPath)\build\DetermineVersionAndSigning.ps1'
arguments: '-releaseVersionNumber ''$(releaseVersionNumber)'' -buildCounter ''$(buildCounter)'''
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: '2.x'
performMultiLevelLookup: true
- task: DotNetCoreCLI@2
displayName: 'Build RabbitMQ package'
inputs:
command: 'custom'
custom: 'build'
arguments: -p:Version=$(VersioningAndSigning.FullVersionNumber) -p:CommitHash=$(Build.SourceVersion) -c Release
projects: |
**\WebJobs.Extensions.RabbitMQ.csproj
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
displayName: 'ESRP CodeSigning: Strong Name and Authenticode'
inputs:
ConnectedServiceName: 'ESRP Service'
FolderPath: 'src\bin\Release\netstandard2.0'
Pattern: WebJobs.Extensions.RabbitMQ*.dll
signConfigType: inlineSignParams
inlineOperation: |
[
{
"KeyCode": "CP-230012",
"OperationCode": "SigntoolSign",
"Parameters": {
"OpusName": "Microsoft",
"OpusInfo": "http://www.microsoft.com",
"FileDigest": "/fd \"SHA256\"",
"PageHash": "/NPH",
"TimeStamp": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
},
"ToolName": "sign",
"ToolVersion": "1.0"
},
{
"KeyCode": "CP-230012",
"OperationCode": "SigntoolVerify",
"Parameters": {},
"ToolName": "sign",
"ToolVersion": "1.0"
}
]
condition: and(succeeded(), startsWith(variables['VersioningAndSigning.SignArtifacts'], 'true'))
- task: DeleteFiles@1
displayName: 'Delete CodeSignSummary files'
inputs:
contents: '**\CodeSignSummary-*.md'
condition: and(succeeded(), startsWith(variables['VersioningAndSigning.SignArtifacts'], 'true'))
- task: DotNetCoreCLI@2
displayName: 'Pack RabbitMQ package'
inputs:
command: 'custom'
custom: 'pack'
arguments: '--no-build -p:Version=$(VersioningAndSigning.FullVersionNumber) -p:CommitHash=$(Build.SourceVersion) -c Release -o packages\Microsoft.Azure.WebJobs.Extensions.RabbitMQ'
projects: |
**\WebJobs.Extensions.RabbitMQ.csproj
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
displayName: 'ESRP CodeSigning: Nupkg'
inputs:
ConnectedServiceName: 'ESRP Service'
FolderPath: 'packages\Microsoft.Azure.WebJobs.Extensions.RabbitMQ'
Pattern: 'Microsoft.Azure.WebJobs.Extensions.RabbitMQ*.nupkg'
signConfigType: inlineSignParams
inlineOperation: |
[
{
"KeyCode": "CP-401405",
"OperationCode": "NuGetSign",
"Parameters": {},
"ToolName": "sign",
"ToolVersion": "1.0"
},
{
"KeyCode": "CP-401405",
"OperationCode": "NuGetVerify",
"Parameters": {},
"ToolName": "sign",
"ToolVersion": "1.0"
}
]
condition: and(succeeded(), startsWith(variables['VersioningAndSigning.SignArtifacts'], 'true'))
- task: DeleteFiles@1
displayName: 'Delete CodeSignSummary files'
inputs:
contents: '**\CodeSignSummary-*.md'
condition: and(succeeded(), startsWith(variables['VersioningAndSigning.SignArtifacts'], 'true'))
- task: PowerShell@2
displayName: 'Mvn package'
name: MvnBuildAndPackage
inputs:
filePath: '$(Build.Repository.LocalPath)\build\mvnBuildAndPackage.ps1'
arguments: '-mvnPrefix ''$(mvnPrefix)'' -mvnVersion ''$(mvnVersion)'''
- publish: $(Build.Repository.LocalPath)\packages\Microsoft.Azure.WebJobs.Extensions.RabbitMQ
artifact: NugetPackage
- publish: $(Build.Repository.LocalPath)\binding-library\java\ToBePublished
artifact: MavenPackage
- job: RunTests
pool:
vmImage: 'vs2017-win2016'
steps:
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: '2.x'
performMultiLevelLookup: true
- task: DotNetCoreCLI@2
displayName: 'Tests'
inputs:
command: 'test'
testRunTitle: 'Tests'
arguments: '-v n'
projects: |
**\WebJobs.Extensions.RabbitMQ.Tests.csproj