-
Notifications
You must be signed in to change notification settings - Fork 357
/
azure-pipelines.yml
175 lines (163 loc) · 5.52 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
174
175
variables:
- group: 'WebJobs SDK Testing'
- name: buildNumber
value: $[ counter('constant', 12000) ]
- name: buildOutputDirectory
value: '$(System.DefaultWorkingDirectory)\buildoutput'
- name: buildVersion
value: '3.0.$(buildNumber)'
## NOTE: This variable denotes the overall build version and is distinct from individual package versions.
- name: isPr
value: $[ eq(variables['Build.Reason'], 'PullRequest') ]
- name: hasTag
value: $[ startsWith(variables['Build.SourceBranch'], 'refs/tags') ]
- name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
value: ${{ true }}
pr:
branches:
include:
- dev
- master
trigger:
branches:
include:
- dev
- master
tags:
include:
- '*'
jobs:
- job: BuildAndTest
pool:
name: '1ES-Hosted-AzFunc'
demands:
- ImageOverride -equals MMS2019TLS
steps:
- template: build/install-dotnet.yml
- task: 1ESHostedPoolValidation@1
- task: DotNetCoreCLI@2
displayName: 'Build source'
inputs:
command: 'build'
arguments: '-c Release'
projects: 'Webjobs.sln'
env:
CommitHash: $(Build.SourceVersion)
- task: DotNetCoreCLI@2
displayName: 'Run tests'
inputs:
command: 'test'
arguments: '--no-build -c Release'
projects: |
test\Microsoft.Azure.WebJobs.Extensions.Rpc.UnitTests\*.csproj
test\Microsoft.Azure.WebJobs.Host.UnitTests\*.csproj
test\Microsoft.Azure.WebJobs.Host.FunctionalTests\*.csproj
test\Microsoft.Azure.WebJobs.Logging.FunctionalTests\*.csproj
test\Microsoft.Azure.WebJobs.Host.EndToEndTests\*.csproj
env:
AzureWebJobsDashboard: $(Storage)
AzureWebJobsStorage: $(Storage)
AzureWebJobsSecondaryStorage: $(Storage2)
AzureWebJobsServiceBus: $(ServiceBus)
AzureWebJobsServiceBusSecondary: $(ServiceBus2)
AzureWebJobsTestHubConnection: $(EventHub)
AzureWebJobsTestHubConnection2: $(EventHub2)
APPINSIGHTS_REPORTER_KEY: $(AppInsights)
ConnectionStrings:ServiceBus: $(ServiceBus)
ConnectionStrings:ServiceBusSecondary: $(ServiceBus2)
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@2
displayName: 'ESRP CodeSigning - Authenticode'
condition: eq(variables.isPr, false)
inputs:
ConnectedServiceName: 'ESRP Service'
FolderPath: 'src'
Pattern: Microsoft.Azure.WebJobs.*.dll
signConfigType: inlineSignParams
inlineOperation: |
[
{
"KeyCode" : "CP-233863-SN",
"OperationCode" : "StrongNameSign",
"Parameters" : {},
"ToolName" : "sign",
"ToolVersion" : "1.0"
},
{
"KeyCode" : "CP-233863-SN",
"OperationCode" : "StrongNameVerify",
"Parameters" : {},
"ToolName" : "sign",
"ToolVersion" : "1.0"
},
{
"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"
}
]
- task: DotNetCoreCLI@2
displayName: 'Pack'
inputs:
command: 'custom'
custom: 'pack'
${{ if eq(variables.hasTag, true) }}:
arguments: '--no-build -c Release -o $(buildOutputDirectory)'
${{ else }}:
arguments: '--no-build -c Release -o $(buildOutputDirectory) --version-suffix -$(buildNumber)'
projects: |
src\Microsoft.Azure.WebJobs\WebJobs.csproj
src\Microsoft.Azure.WebJobs.Host\WebJobs.Host.csproj
src\Microsoft.Azure.WebJobs.Host\WebJobs.Host.Sources.csproj
src\Microsoft.Azure.WebJobs.Logging\WebJobs.Logging.csproj
src\Microsoft.Azure.WebJobs.Logging.ApplicationInsights\WebJobs.Logging.ApplicationInsights.csproj
src\Microsoft.Azure.WebJobs.Host.Storage\WebJobs.Host.Storage.csproj
src\Microsoft.Azure.WebJobs.Rpc.Core\WebJobs.Rpc.Core.csproj
src\Microsoft.Azure.WebJobs.Extensions.Rpc\WebJobs.Extensions.Rpc.csproj
test\Microsoft.Azure.WebJobs.Host.TestCommon\WebJobs.Host.TestCommon.csproj
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@2
displayName: 'ESRP CodeSigning: Nupkg'
condition: eq(variables.isPr, false)
inputs:
ConnectedServiceName: 'ESRP Service'
FolderPath: '$(buildOutputDirectory)'
Pattern: 'Microsoft.Azure.WebJobs*.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"
}
]
- task: ManifestGeneratorTask@0
displayName: "SBOM Generation"
inputs:
BuildDropPath: '$(buildOutputDirectory)'
Verbosity: 'Information'
- publish: '$(buildOutputDirectory)'
artifact: drop