Skip to content

Commit 2f8b00b

Browse files
committed
See if we need a separate package step or not, move into job
1 parent 4bd59c7 commit 2f8b00b

File tree

2 files changed

+91
-30
lines changed

2 files changed

+91
-30
lines changed

.vsts-dnup-ci.yml

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -84,36 +84,39 @@ extends:
8484
ignoreDirectories: artifacts, .packages
8585

8686
stages:
87-
### Windows ###
88-
- template: /eng/pipelines/templates/jobs/dnup-tests.yml@self
89-
parameters:
90-
pool:
91-
name: $($(DncEngInternalBuildPool))
92-
image: windows.vs2022.amd64
93-
os: windows
94-
emoji: 🪟
95-
helixTargetQueue: windows.amd64.vs2022.pre
96-
oneESCompat:
97-
templateFolderName: templates-official
98-
publishTaskPrefix: 1ES.
99-
runtimeSourceProperties: /p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64)
100-
# WORKAROUND: BinSkim requires the folder exist prior to scanning.
101-
preSteps:
102-
- powershell: New-Item -ItemType Directory -Path $(Build.SourcesDirectory)/artifacts/bin -Force
103-
displayName: Create artifacts/bin directory
104-
${{ if and(eq(parameters.runTestBuild, false), ne(variables['Build.Reason'], 'PullRequest')) }}:
105-
timeoutInMinutes: 180
106-
windowsJobParameterSets:
107-
### OFFICIAL ###
108-
- categoryName: Official
109-
publishArgument: $(_publishArgument)
110-
signArgument: $(_signArgument)
111-
officialBuildProperties: $(_officialBuildProperties) /p:BuildWorkloads=true
112-
enableDefaultArtifacts: true
113-
runTests: false
114-
publishRetryConfig: true
115-
variables:
116-
_SignType: real
87+
- stage: tests
88+
displayName: 🧪 dnup tests
89+
jobs:
90+
### Windows ###
91+
- template: /eng/pipelines/templates/jobs/dnup-tests.yml@self
92+
parameters:
93+
pool:
94+
name: $(DncEngInternalBuildPool)
95+
image: windows.vs2022.amd64
96+
os: windows
97+
emoji: 🪟
98+
helixTargetQueue: windows.amd64.vs2022.pre
99+
oneESCompat:
100+
templateFolderName: templates-official
101+
publishTaskPrefix: 1ES.
102+
runtimeSourceProperties: /p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64)
103+
# WORKAROUND: BinSkim requires the folder exist prior to scanning.
104+
preSteps:
105+
- powershell: New-Item -ItemType Directory -Path $(Build.SourcesDirectory)/artifacts/bin -Force
106+
displayName: Create artifacts/bin directory
107+
${{ if and(eq(parameters.runTestBuild, false), ne(variables['Build.Reason'], 'PullRequest')) }}:
108+
timeoutInMinutes: 180
109+
windowsJobParameterSets:
110+
### OFFICIAL ###
111+
- categoryName: Official
112+
publishArgument: $(_publishArgument)
113+
signArgument: $(_signArgument)
114+
officialBuildProperties: $(_officialBuildProperties) /p:BuildWorkloads=true
115+
enableDefaultArtifacts: true
116+
runTests: false
117+
publishRetryConfig: true
118+
variables:
119+
_SignType: real
117120
### Packaging ###
118121
- stage: package
119122
displayName: 📦 Package dnup
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
parameters:
2+
### GENERAL ###
3+
variables: {}
4+
dependsOn: ''
5+
helixTargetQueue: ''
6+
oneESCompat:
7+
templateFolderName: templates
8+
publishTaskPrefix: ''
9+
container: ''
10+
helixTargetContainer: ''
11+
categoryName: dnup
12+
runTests: true
13+
publishRetryConfig: false
14+
publishXunitResults: false
15+
enableSbom: true
16+
timeoutInMinutes: 150
17+
18+
jobs:
19+
- template: /eng/common/${{ parameters.oneESCompat.templateFolderName }}/job/job.yml
20+
parameters:
21+
displayName: '${{ parameters.pool.emoji }} dnup package: ${{ parameters.pool.os }} (${{ parameters.helixTargetQueue }})'
22+
pool: ${{ parameters.pool }}
23+
container: ${{ parameters.container }}
24+
strategy: ${{ parameters.strategy }}
25+
helixRepo: dotnet/sdk
26+
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
27+
enableMicrobuild: true
28+
enablePublishBuildAssets: true
29+
enableTelemetry: true
30+
enablePublishUsingPipelines: true
31+
enableSbom: ${{ parameters.enableSbom }}
32+
variables:
33+
- ${{ insert }}: ${{ parameters.variables }}
34+
dependsOn: ${{ parameters.dependsOn }}
35+
preSteps: ${{ parameters.preSteps }}
36+
templateContext:
37+
sdl:
38+
binskim:
39+
analyzeTargetGlob: +:f|eng\**\*.props;+:f|artifacts\bin\**\*.dll;+:f|artifacts\bin\**\*.exe;-:f|artifacts\bin\**\msdia140.dll;-:f|artifacts\bin\**\pgort140.dll;-:f|artifacts\bin\*Tests\**;-:f|**\Microsoft.NET.Runtime.Emscripten**\tools\**;-:f|**\CodeCoverage\**;-:f|artifacts\bin\**\capstone.dll;
40+
41+
steps:
42+
- ${{ if eq(parameters.pool.os, 'windows') }}:
43+
- powershell: |
44+
& .\restore.cmd
45+
displayName: 🍱 Bootstrap toolset (Windows)
46+
- powershell: |
47+
& .\.dotnet\dotnet restore test\dnup.Tests\dnup.Tests.csproj
48+
displayName: ♻️ Restore dnup tests (Windows)
49+
- powershell: |
50+
& .\.dotnet\dotnet build test\dnup.Tests\dnup.Tests.csproj -c Release --no-restore
51+
displayName: 💻 Build Windows
52+
- task: PublishBuildArtifacts@1
53+
displayName: ⬇️ Publish test artifacts
54+
condition: always()
55+
inputs:
56+
PathtoPublish: $(Build.SourcesDirectory)/artifacts/dnupTestResults
57+
ArtifactName: dnupTestResults_${{ parameters.pool.os }}
58+
publishLocation: Container

0 commit comments

Comments
 (0)