forked from microsoft/azure-pipelines-tasks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
146 lines (133 loc) · 4.25 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
trigger:
- master
- releases/*
- node6hotfixes/*
resources:
repositories:
- repository: AzureDevOps
type: git
endpoint: AzureDevOps
name: AzureDevOps/AzureDevOps
jobs:
# All tasks on Windows
- job: build_all_windows
displayName: Build all tasks (Windows)
condition: and(succeeded(), not(variables.task), eq(variables.os, 'Windows_NT'))
pool:
vmImage: windows-2022
timeoutInMinutes: 120
steps:
- template: ci/build-all-steps.yml
parameters:
os: Windows_NT
# Publish on Windows
- job: publish_windows
displayName: Publish
dependsOn:
- build_all_windows
condition: and(succeeded(), ne(variables['build.reason'], 'PullRequest'), eq(variables.os, 'Windows_NT'))
pool:
vmImage: windows-2022
steps:
- template: ci/publish-steps.yml
# Courtesy push on Windows
- job: courtesy_push_windows
displayName: Courtesy Push
dependsOn:
- publish_windows
condition: and(succeeded(), in(variables['build.reason'], 'Schedule', 'Manual'), eq(variables['COURTESY_PUSH'], 'true'))
pool:
vmImage: windows-2022
steps:
- powershell: |
$week = (Invoke-WebRequest https://whatsprintis.it -Headers @{"Accept"= "application/json"} | ConvertFrom-Json).week
Write-Host "##vso[task.setvariable variable=week]$week"
displayName: "Determine if its the last week of the sprint"
- checkout: AzureDevOps
fetchDepth: 1
persistCredentials: true
condition: and(succeeded(), or(eq(variables['WEEK'], '3'), eq(variables['FORCE_COURTESY_PUSH'], 'true')))
- checkout: self
condition: and(succeeded(), or(eq(variables['WEEK'], '3'), eq(variables['FORCE_COURTESY_PUSH'], 'true')))
- template: ci/courtesy-push.yml
# Send notifications by POST method to MS Teams webhook
# Body of message is compiled as Office 365 connector card
# More details about cards - https://docs.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/cards/cards-reference#office-365-connector-card
- job: notify_courtesy_push_fail
displayName: Notify courtesy push fail
dependsOn:
- courtesy_push_windows
condition: |
and
(
in(dependencies.courtesy_push_windows.result, 'Failed', 'Skipped'),
eq(variables['COURTESY_PUSH'], 'true'),
eq(variables['build.reason'], 'Schedule'),
eq(variables['COURTESY_PUSH_NOTIFICATION'], 'true')
)
pool:
vmImage: windows-2022
steps:
- powershell: .\ci\courtesy-push\send-notification.ps1 -IsPRCreated $false
displayName: 'Send notification to the MS Teams channel'
env:
TEAMS_WEBHOOK: $(MSTeamsUri)
# All tasks on Linux
- job: build_all_linux
displayName: Build all tasks (Linux)
condition: and(succeeded(), not(variables.task), eq(variables.os, 'Linux'))
pool:
vmImage: ubuntu-18.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: and(succeeded(), not(variables.task), eq(variables.os, 'Darwin'))
pool:
vmImage: macos-11
steps:
- template: ci/build-all-steps.yml
parameters:
os: Darwin
# Single task
- job: buildSingle
displayName: Build single task
condition: and(succeeded(), variables.task)
pool:
vmImage: windows-2022
steps:
- template: ci/build-single-steps.yml
# Single task build and push
- job: buildAndPushSingle
displayName: Build And Push Single Task
condition: and(succeeded(), ne(variables['build.reason'], 'PullRequest'), variables.task, variables.rollForward)
pool:
vmImage: windows-2022
steps:
- template: ci/build-and-push-single-steps.yml
parameters:
os: Windows_NT
- job: buildSharedNpm_win
displayName: Build shared npm packages (Win)
condition: and(succeeded(), not(variables.task), eq(variables.os, 'Windows_NT'))
pool:
vmImage: windows-2022
steps:
- template: ci/build-common-npm.yml
- job: buildSharedNpm_linux
displayName: Build shared npm packages (Linux)
condition: and(succeeded(), not(variables.task), eq(variables.os, 'Linux'))
pool:
vmImage: ubuntu-18.04
steps:
- template: ci/build-common-npm.yml
- job: buildSharedNpm_darwin
displayName: Build shared npm packages (macOS)
condition: and(succeeded(), not(variables.task), eq(variables.os, 'Darwin'))
pool:
vmImage: macos-11
steps:
- template: ci/build-common-npm.yml