-
Notifications
You must be signed in to change notification settings - Fork 906
Expand file tree
/
Copy pathdotnet-yarp-release.yml
More file actions
83 lines (77 loc) · 2.48 KB
/
dotnet-yarp-release.yml
File metadata and controls
83 lines (77 loc) · 2.48 KB
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
trigger: none
name: $(Date:yyyyMMdd).$(Rev:r)
variables:
- name: NuGetApiKey
value:
- name: NuGetFeed
value: https://api.nuget.org/v3/index.json
resources:
repositories:
- repository: 1ESPipelineTemplates
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
pipelines:
- pipeline: yarp-build
source: dotnet\yarp\dotnet-yarp-official
extends:
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
parameters:
pool:
name: NetCore1ESPool-Internal
image: 1es-windows-2022
os: windows
stages:
- stage: release
displayName: Release to NuGet
jobs:
- job: PreDeploymentApprovalJob
displayName: Pre-Deployment Approval
condition: succeeded()
timeoutInMinutes: 2880
pool: server
steps:
- task: ManualValidation@1
inputs:
notifyUsers: |-
karelz@microsoft.com,
samsp@microsoft.com,
adityam@microsoft.com,
mizupan@microsoft.com,
bpetit@microsoft.com
approvers: |-
karelz@microsoft.com,
samsp@microsoft.com,
adityam@microsoft.com
- job: NuGetPush
dependsOn: PreDeploymentApprovalJob
condition: succeeded()
timeoutInMinutes: 30
templateContext:
type: releaseJob
isProduction: true
inputs:
- input: pipelineArtifact
pipeline: yarp-build
artifactName: artifacts
steps:
- task: NuGetToolInstaller@1
displayName: Prepare NuGet tool
- task: PowerShell@2
displayName: NuGet push
inputs:
targetType: inline
script: |
tree $(Pipeline.Workspace)\Release\Shipping /f
Get-ChildItem "$(Pipeline.Workspace)\Release\Shipping\*" -Filter *.nupkg -Exclude *.symbols.nupkg | ForEach-Object {
$name = $_.Name
Write-Host "Processing $name ..."
if ($name.StartsWith("Yarp.ReverseProxy.") -or $name.StartsWith("Yarp.Telemetry.Consumption.")) {
Write-Host " Publishing $name"
nuget push -Source $env:NuGetFeed -ApiKey $env:NuGetApiKey $_.FullName
} else {
Write-Host " Skipping $name (update the script to change this)"
}
}
env:
NuGetApiKey: $(NuGetApiKey)