Skip to content

Commit 2cbf233

Browse files
authored
Merge branch 'release/dnup' into dnup-logging
2 parents 05df5f2 + 487be24 commit 2cbf233

File tree

6 files changed

+119
-49
lines changed

6 files changed

+119
-49
lines changed

.vsts-dnup-ci.yml

Lines changed: 44 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Pipeline: https://dev.azure.com/dnceng/internal/_build?definitionId=
1+
# Pipeline: https://dev.azure.com/dnceng/internal/_build?definitionId=1544
22

33
trigger:
44
batch: true
@@ -44,11 +44,17 @@ variables:
4444
value: -publish
4545
- name: _signArgument
4646
value: -sign /p:SignCoreSdk=true
47+
- name: _TeamName
48+
value: DotNet-Cli
49+
- name: _BuildConfig
50+
value: Release
4751
- name: _officialBuildProperties
4852
# The OfficialBuilder property is set to Microsoft for the official build only.
4953
# This property is checked in Directory.Build.props and adds the MICROSOFT_ENABLE_TELEMETRY constant.
5054
# This constant is used in CompileOptions.cs to set both TelemetryOptOutDefault and TelemetryOptOutDefaultString.
5155
value: /p:DotNetPublishUsingPipelines=true /p:OfficialBuilder=Microsoft /p:OfficialBuildId=$(Build.BuildNumber)
56+
- name: _SignType
57+
value: real
5258

5359
resources:
5460
repositories:
@@ -84,45 +90,45 @@ extends:
8490
ignoreDirectories: artifacts, .packages
8591

8692
stages:
87-
############### BUILD STAGE ###############
88-
############### WINDOWS ###############
89-
- template: /eng/pipelines/templates/jobs/dnup-tests.yml@self
90-
parameters:
91-
pool:
92-
name: $($(DncEngInternalBuildPool))
93-
image: windows.vs2022.amd64
94-
os: windows
95-
emoji: 🪟
96-
helixTargetQueue: windows.amd64.vs2022.pre
97-
oneESCompat:
98-
templateFolderName: templates-official
99-
publishTaskPrefix: 1ES.
100-
runtimeSourceProperties: /p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64)
101-
# WORKAROUND: BinSkim requires the folder exist prior to scanning.
102-
preSteps:
103-
- powershell: New-Item -ItemType Directory -Path $(Build.SourcesDirectory)/artifacts/bin -Force
104-
displayName: Create artifacts/bin directory
105-
${{ if and(eq(parameters.runTestBuild, false), ne(variables['Build.Reason'], 'PullRequest')) }}:
106-
timeoutInMinutes: 180
107-
windowsJobParameterSets:
108-
### OFFICIAL ###
109-
- categoryName: Official
110-
publishArgument: $(_publishArgument)
111-
signArgument: $(_signArgument)
112-
officialBuildProperties: $(_officialBuildProperties) /p:BuildWorkloads=true
113-
enableDefaultArtifacts: true
114-
runTests: false
115-
publishRetryConfig: true
116-
variables:
117-
_SignType: real
118-
119-
############### PACKAGE STAGE ###############
120-
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
121-
- stage: publish
122-
displayName: Publish
93+
- stage: tests
94+
displayName: 🧪 dnup tests
95+
jobs:
96+
### Windows ###
97+
- template: /eng/pipelines/templates/jobs/dnup/dnup-tests.yml@self
98+
parameters:
99+
pool:
100+
name: $(DncEngInternalBuildPool)
101+
image: windows.vs2022.amd64
102+
os: windows
103+
emoji: 🪟
104+
helixTargetQueue: windows.amd64.vs2022.pre
105+
oneESCompat:
106+
templateFolderName: templates-official
107+
publishTaskPrefix: 1ES.
108+
runtimeSourceProperties: /p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64)
109+
# WORKAROUND: BinSkim requires the folder exist prior to scanning.
110+
preSteps:
111+
- powershell: New-Item -ItemType Directory -Path $(Build.SourcesDirectory)/artifacts/bin -Force
112+
displayName: Create artifacts/bin directory
113+
${{ if and(eq(parameters.runTestBuild, false), ne(variables['Build.Reason'], 'PullRequest')) }}:
114+
timeoutInMinutes: 180
115+
windowsJobParameterSets:
116+
### OFFICIAL ###
117+
- categoryName: Official
118+
publishArgument: $(_publishArgument)
119+
signArgument: $(_signArgument)
120+
officialBuildProperties: $(_officialBuildProperties) /p:BuildWorkloads=true
121+
enableDefaultArtifacts: true
122+
runTests: false
123+
publishRetryConfig: true
124+
variables:
125+
_SignType: real
126+
### Packaging ###
127+
- stage: package
128+
displayName: 📦 Package dnup
123129
dependsOn: []
124130
jobs:
125-
- template: /eng/pipelines/templates/jobs/dnup-library-package.yml@self
131+
- template: /eng/pipelines/templates/jobs/dnup/dnup-library-package.yml@self
126132
parameters:
127133
pool:
128134
name: $(DncEngInternalBuildPool)

.vsts-dnup-pr.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ pr:
66
branches:
77
include:
88
- dnup
9+
- release/dnup
910
paths:
1011
include:
1112
- src/Installer/dnup/
@@ -29,7 +30,7 @@ stages:
2930
displayName: 🏰 dnup tests
3031
jobs:
3132
############### WINDOWS ###############
32-
- template: /eng/pipelines/templates/jobs/dnup-tests.yml@self
33+
- template: /eng/pipelines/templates/jobs/dnup/dnup-tests.yml@self
3334
parameters:
3435
pool:
3536
name: $(DncEngPublicBuildPool)
@@ -39,7 +40,7 @@ stages:
3940
helixTargetQueue: windows.amd64.vs2022.pre.open
4041

4142
############### LINUX ###############
42-
- template: /eng/pipelines/templates/jobs/dnup-tests.yml@self
43+
- template: /eng/pipelines/templates/jobs/dnup/dnup-tests.yml@self
4344
parameters:
4445
pool:
4546
name: $(DncEngPublicBuildPool)
@@ -49,7 +50,7 @@ stages:
4950
helixTargetQueue: ubuntu.2204.amd64.open
5051

5152
############### MACOS ###############
52-
- template: /eng/pipelines/templates/jobs/dnup-tests.yml@self
53+
- template: /eng/pipelines/templates/jobs/dnup/dnup-tests.yml@self
5354
parameters:
5455
pool:
5556
name: Azure Pipelines
@@ -60,7 +61,7 @@ stages:
6061

6162
### ARM64 ###
6263
- ${{ if eq(parameters.enableArm64Job, true) }}:
63-
- template: /eng/pipelines/templates/jobs/dnup-tests.yml@self
64+
- template: /eng/pipelines/templates/jobs/dnup/dnup-tests.yml@self
6465
parameters:
6566
pool:
6667
name: Azure Pipelines

.vsts-pr.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ pr:
1313
- documentation/*
1414
- README.md
1515
- CODEOWNERS
16+
- .vsts-dnup-ci.yml
17+
- .vsts-dnup-pr.yml
18+
- /eng/pipelines/templates/jobs/dnup/*
19+
- src/Installer/*
20+
- test/dnup.Tests/*
1621

1722
parameters:
1823
- name: enableArm64Job

eng/pipelines/templates/jobs/dnup-library-package.yml

Whitespace-only changes.
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+
outputs:
41+
- output: pipelineArtifact
42+
displayName: '🌐 Publish dnup library packages'
43+
condition: always()
44+
targetPath: '$(Build.SourcesDirectory)/artifacts/packages/Release/NonShipping/'
45+
artifactName: 'dnup-library-packages'
46+
publishLocation: Container
47+
48+
steps:
49+
- ${{ if eq(parameters.pool.os, 'windows') }}:
50+
- powershell: |
51+
& .\restore.cmd
52+
displayName: 🍱 Bootstrap toolset (Windows)
53+
- powershell: |
54+
& .\.dotnet\dotnet build test\dnup.Tests\dnup.Tests.csproj -c Release
55+
displayName: 💻 Build Windows
56+
- powershell: |
57+
& .\.dotnet\dotnet pack .\src\Installer\Microsoft.Dotnet.Installation\Microsoft.Dotnet.Installation.csproj
58+
displayName: 📦 Package dnup library

eng/pipelines/templates/jobs/dnup-tests.yml renamed to eng/pipelines/templates/jobs/dnup/dnup-tests.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ jobs:
3737
sdl:
3838
binskim:
3939
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+
outputs:
41+
- output: pipelineArtifact
42+
displayName: '🌐 Publish Test Artifacts'
43+
condition: always()
44+
targetPath: '$(Build.SourcesDirectory)/artifacts/dnupTestResults'
45+
artifactName: 'dnupTestResults_${{ parameters.pool.os }}'
46+
publishLocation: Container
4047

4148
steps:
4249
- ${{ if eq(parameters.pool.os, 'windows') }}:
@@ -79,10 +86,3 @@ jobs:
7986
testResultsFiles: '**/dnup-tests.trx'
8087
searchFolder: $(Build.SourcesDirectory)/artifacts/dnupTestResults
8188
testRunTitle: 'dnup ${{ parameters.pool.os }}'
82-
- task: PublishBuildArtifacts@1
83-
displayName: ⬇️ Publish test artifacts
84-
condition: always()
85-
inputs:
86-
PathtoPublish: $(Build.SourcesDirectory)/artifacts/dnupTestResults
87-
ArtifactName: dnupTestResults_${{ parameters.pool.os }}
88-
publishLocation: Container

0 commit comments

Comments
 (0)