Skip to content

Commit b5b5497

Browse files
authored
Only build Linux for packaging changes (PowerShell#25103)
1 parent 4bc918b commit b5b5497

File tree

2 files changed

+126
-18
lines changed

2 files changed

+126
-18
lines changed

.vsts-ci/linux-internal.yml

+116
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# Pipeline to run Linux CI internally
2+
name: PR-$(System.PullRequest.PullRequestNumber)-$(Date:yyyyMMdd)$(Rev:.rr)
3+
trigger:
4+
# Batch merge builds together while a merge build is running
5+
batch: true
6+
branches:
7+
include:
8+
- master
9+
- release*
10+
- feature*
11+
paths:
12+
include:
13+
- '*'
14+
exclude:
15+
- .vsts-ci/misc-analysis.yml
16+
- .github/ISSUE_TEMPLATE/*
17+
- .github/workflows/*
18+
- .dependabot/config.yml
19+
- .pipelines/*
20+
- test/perf/*
21+
pr:
22+
branches:
23+
include:
24+
- master
25+
- release*
26+
- feature*
27+
paths:
28+
include:
29+
- '*'
30+
exclude:
31+
- .dependabot/config.yml
32+
- .github/ISSUE_TEMPLATE/*
33+
- .github/workflows/*
34+
- .vsts-ci/misc-analysis.yml
35+
- .vsts-ci/windows.yml
36+
- .vsts-ci/windows/*
37+
- tools/cgmanifest.json
38+
- LICENSE.txt
39+
- test/common/markdown/*
40+
- test/perf/*
41+
- tools/releaseBuild/*
42+
- tools/install*
43+
- tools/releaseBuild/azureDevOps/templates/*
44+
- README.md
45+
- .spelling
46+
- .pipelines/*
47+
48+
variables:
49+
DOTNET_CLI_TELEMETRY_OPTOUT: 1
50+
POWERSHELL_TELEMETRY_OPTOUT: 1
51+
# Avoid expensive initialization of dotnet cli, see: https://donovanbrown.com/post/Stop-wasting-time-during-NET-Core-builds
52+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
53+
__SuppressAnsiEscapeSequences: 1
54+
nugetMultiFeedWarnLevel: none
55+
56+
resources:
57+
repositories:
58+
- repository: Docker
59+
type: github
60+
endpoint: PowerShell
61+
name: PowerShell/PowerShell-Docker
62+
ref: master
63+
64+
stages:
65+
- stage: BuildLinuxStage
66+
displayName: Build for Linux
67+
jobs:
68+
- template: templates/ci-build.yml
69+
parameters:
70+
pool: ubuntu-20.04
71+
jobName: linux_build
72+
displayName: linux Build
73+
74+
- stage: TestUbuntu
75+
displayName: Test for Ubuntu
76+
dependsOn: [BuildLinuxStage]
77+
jobs:
78+
- template: templates/nix-test.yml
79+
parameters:
80+
name: Ubuntu
81+
pool: ubuntu-20.04
82+
purpose: UnelevatedPesterTests
83+
tagSet: CI
84+
85+
- template: templates/nix-test.yml
86+
parameters:
87+
name: Ubuntu
88+
pool: ubuntu-20.04
89+
purpose: ElevatedPesterTests
90+
tagSet: CI
91+
92+
- template: templates/nix-test.yml
93+
parameters:
94+
name: Ubuntu
95+
pool: ubuntu-20.04
96+
purpose: UnelevatedPesterTests
97+
tagSet: Others
98+
99+
- template: templates/nix-test.yml
100+
parameters:
101+
name: Ubuntu
102+
pool: ubuntu-20.04
103+
purpose: ElevatedPesterTests
104+
tagSet: Others
105+
106+
- template: templates/verify-xunit.yml
107+
parameters:
108+
pool: ubuntu-20.04
109+
110+
- stage: PackageLinux
111+
displayName: Package Linux
112+
dependsOn: ["BuildLinuxStage"]
113+
jobs:
114+
- template: linux/templates/packaging.yml
115+
parameters:
116+
pool: ubuntu-20.04

.vsts-ci/linux.yml

+10-18
Original file line numberDiff line numberDiff line change
@@ -34,24 +34,16 @@ pr:
3434
- feature*
3535
paths:
3636
include:
37-
- '*'
38-
exclude:
39-
- .dependabot/config.yml
40-
- .github/ISSUE_TEMPLATE/*
41-
- .github/workflows/*
42-
- .vsts-ci/misc-analysis.yml
43-
- .vsts-ci/windows.yml
44-
- .vsts-ci/windows/*
45-
- tools/cgmanifest.json
46-
- LICENSE.txt
47-
- test/common/markdown/*
48-
- test/perf/*
49-
- tools/releaseBuild/*
50-
- tools/install*
51-
- tools/releaseBuild/azureDevOps/templates/*
52-
- README.md
53-
- .spelling
54-
- .pipelines/*
37+
- .vsts-ci/linux.yml
38+
- .vsts-ci/linux/templates/packaging.yml
39+
- assets/manpage/*
40+
- build.psm1
41+
- global.json
42+
- nuget.config
43+
- PowerShell.Common.props
44+
- src/*.csproj
45+
- tools/ci.psm1
46+
- tools/packaging/*
5547

5648
variables:
5749
DOTNET_CLI_TELEMETRY_OPTOUT: 1

0 commit comments

Comments
 (0)