forked from microsoft/azure-pipelines-tasks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
126 lines (112 loc) · 2.93 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
trigger:
- master
- releases/*
- node6hotfixes/*
resources:
repositories:
- repository: AzureDevOps
type: git
endpoint: AzureDevOps
name: AzureDevOps/AzureDevOps
- repository: ConfigChange
type: git
endpoint: AzureDevOps
name: AzureDevOps/AzureDevOps.ConfigChange
parameters:
- name: build_single_task
displayName: Build Single Task
type: boolean
default: false
- name: task_name
displayName: Task Name
type: string
default: TaskNameVN
- name: push_to_feed
displayName: Push to Feed
type: boolean
default: false
- name: generate_prs
displayName: Create hotfix PRs and Release
type: boolean
default: false
variables:
currentDate: $[ format('{0:yyyy}{0:MM}{0:dd}', pipeline.startTime) ]
jobs:
- ${{ if parameters.build_single_task }}:
- template: ci/build-single-jobs.yml
parameters:
task_name: ${{ parameters.task_name }}
push_to_feed: ${{ parameters.push_to_feed }}
generate_prs: ${{ parameters.generate_prs }}
- ${{ if not(parameters.build_single_task) }}:
# All tasks on Windows
- job: build_all_windows
displayName: Build all tasks (Windows)
condition: eq(variables.os, 'Windows_NT')
timeoutInMinutes: 180
pool:
vmImage: windows-2022
steps:
- template: ci/build-all-steps.yml
parameters:
os: Windows_NT
# Publish
- job: publish
displayName: Publish
dependsOn:
- build_all_windows
condition: and(succeeded(), ne(variables['build.reason'], 'PullRequest'))
pool:
vmImage: windows-2022
steps:
- template: ci/publish-steps.yml
# Courtesy Push
- job: courtesy_push
displayName: Courtesy Push
dependsOn:
- publish
condition: |
and(succeeded(), eq(variables['COURTESY_PUSH'], 'true'), or(
eq(variables['build.reason'], 'Schedule'),
and(eq(variables['build.reason'], 'Manual'), eq(variables['FORCE_COURTESY_PUSH'], 'true'))
))
pool:
vmImage: windows-2022
steps:
- checkout: AzureDevOps
fetchDepth: 1
persistCredentials: true
- checkout: self
- template: ci/courtesy-push.yml
- job: build_all_tasks_for_deployments
displayName: Build all tasks for deployments (Windows)
dependsOn:
- courtesy_push
condition: succeeded()
timeoutInMinutes: 180
pool:
name: 1ES-Shared-Hosted-Pool_Windows-Server-2022
steps:
- template: ci/build-all-tasks.yml
# All tasks on Linux
- job: build_all_linux
displayName: Build all tasks (Linux)
condition: eq(variables.os, 'Linux')
timeoutInMinutes: 180
pool:
vmImage: ubuntu-20.04
steps:
- template: ci/build-all-steps.yml
parameters:
os: Linux
# All tasks on macOS
- job: build_all_darwin
displayName: Build all tasks (macOS)
condition: eq(variables.os, 'Darwin')
timeoutInMinutes: 180
pool:
vmImage: macos-11
steps:
- template: ci/build-all-steps.yml
parameters:
os: Darwin