-
Notifications
You must be signed in to change notification settings - Fork 74
/
azure-pipelines-pr.yml
100 lines (89 loc) · 2.73 KB
/
azure-pipelines-pr.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
variables:
# Cannot use key:value syntax in root defined variables
- name: _PublishUsingPipelines
value: true
- name: AzdoOrgUri
value: https://dev.azure.com/dnceng
- name: AzdoProject
value: internal
- name: configuration
value: Release
pr:
branches:
include:
- main
- production
paths:
include:
- '*'
exclude:
- '**/*.md'
- '.github/*'
- 'docs/*'
- CODE-OF-CONDUCT.md
- LICENSE.TXT
- README.md
- SECURITY.md
- THIRD-PARTY-NOTICES.TXT
pool:
name: NetCore1ESPool-Internal-NoMSI
demands: ImageOverride -equals 1es-windows-2019
stages:
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
- stage: GitHub_Issue_Verification
displayName: GitHub Issue Verification
dependsOn: []
# System.PullRequest.TargetBranch only evaulates during runtime conditions
condition: and(notIn(variables['System.PullRequest.TargetBranch'], 'refs/heads/production', 'production'), notIn(variables['System.PullRequest.SourceBranch'], 'refs/heads/production', 'production'))
jobs:
- job: VerifyGitHubIssue
displayName: Verify GitHub Issue Link included in all PRs
pool:
vmImage: windows-latest
steps:
- checkout: self
- powershell: eng/enforce-issue.ps1 -PullRequestNumber $(System.PullRequest.PullRequestNumber) -RepositoryName $(Build.Repository.Name)
displayName: Enforce GitHub issue link presence
- stage: build
dependsOn: []
displayName: Build
jobs:
- template: /eng/common/templates/jobs/jobs.yml
parameters:
artifacts:
publish:
logs: true
${{ if in(variables['Build.SourceBranch'], 'refs/heads/main', 'refs/heads/production') }}:
artifacts: true
manifests: true
enableTelemetry: true
enableMicrobuild: false
enablePublishTestResults: false
enablePublishUsingPipelines: ${{ variables._PublishUsingPipelines }}
jobs:
- job: Build
displayName: Build Repo
timeoutInMinutes: 90
pool:
name: NetCore-Public
demands: ImageOverride -equals 1es-windows-2022-open
steps:
- checkout: self
clean: true
- template: /eng/templates/steps/build.yml
parameters:
configuration: $(configuration)
- template: /eng/templates/steps/test.yml
parameters:
configuration: $(configuration)
- job: Builder_Docker
displayName: Build Docker Image
pool:
name: NetCore-Public
demands: ImageOverride -equals 1es-ubuntu-2004-open
steps:
- checkout: self
clean: true
- template: /eng/templates/steps/docker-build.yml
parameters:
dockerImageName: test