-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
116 lines (107 loc) · 3.83 KB
/
azure-pipelines.yml
File metadata and controls
116 lines (107 loc) · 3.83 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
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
variables:
- name: _TeamName
value: DotNetCore
- group: AzureDevOps-Artifact-Feeds-Pats
- group: SDL_Settings
- ${{ if notin(variables['Build.Reason'], 'Schedule') }}:
- name: PoolProvider
value: NetCore1ESPool-Internal
- ${{ else }}:
- name: PoolProvider
value: NetCore1ESPool-Internal-Int
trigger:
batch: true
branches:
include:
- main
- release/*
pr: none
schedules:
- cron: "0 0 * * *"
displayName: Once a day build using Staging pools (at midnight)
branches:
include:
- main
always: true
resources:
repositories:
- repository: 1ESPipelineTemplates
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
extends:
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
parameters:
pool:
name: $(PoolProvider)
image: windows.vs2022.amd64
os: windows
settings:
networkIsolationPolicy: Permissive, CFSClean, CFSClean2
stages:
- template: /eng/build.yml@self
- stage: Create_BAR_ID_Tag
displayName: Create BAR ID Tag
condition: succeededOrFailed()
jobs:
- template: /eng/common/templates-official/job/job.yml@self
parameters:
name: Create_BAR_ID_Tag
displayName: Create BAR ID Tag
variables:
- group: Publish-Build-Assets
preSteps:
- checkout: self
clean: true
steps:
- task: AzureCLI@2
displayName: Create BAR ID Tag
inputs:
azureSubscription: "Darc: Maestro Production"
scriptType: ps
scriptLocation: scriptPath
scriptPath: $(Build.SourcesDirectory)/eng/create-baridtag.ps1
- template: /eng/common/templates-official/post-build/post-build.yml@self
parameters:
publishingInfraVersion: 4
# Symbol validation isn't being very reliable lately. This should be enabled back
# once this issue is resolved: https://github.com/dotnet/arcade/issues/2871
enableSymbolValidation: false
enableSourceLinkValidation: true
- stage: Promote_Arcade_To_Latest
displayName: Promote Arcade to '.NET Eng - Latest' channel
jobs:
- template: /eng/common/templates-official/job/job.yml@self
parameters:
name: Promote_Arcade_To_Latest
displayName: Promote Arcade to '.NET Eng - Latest' channel
timeoutInMinutes: 180
variables:
- group: Publish-Build-Assets
- group: DotNetBot-GitHub
- name: skipComponentGovernanceDetection
value: true
preSteps:
- checkout: self
clean: true
steps:
- task: AzureCLI@2
displayName: Get AzDO token (WIF)
name: GetAzDoToken
inputs:
azureSubscription: "dnceng-build-rw-code-rw-wif"
scriptType: ps
scriptLocation: inlineScript
inlineScript: |
$azdoToken = az account get-access-token --resource "499b84ac-1321-427f-aa17-267ca6975798" --query accessToken -o tsv
if ($LASTEXITCODE -ne 0) { Write-Error "Failed to get AzDO token"; exit 1 }
Write-Host "Successfully obtained AzDO token from WIF service connection"
Write-Host "##vso[task.setvariable variable=WifAzDoToken;issecret=true]$azdoToken"
- task: AzureCLI@2
displayName: Promote Arcade to 'Latest' channel
inputs:
azureSubscription: "Darc: Maestro Production"
scriptType: ps
scriptLocation: scriptPath
scriptPath: $(Build.SourcesDirectory)/eng/validation/update-channel.ps1
arguments: -azdoToken $(WifAzDoToken)