Skip to content

Commit ed432aa

Browse files
committed
Update framework pipeline
1 parent 4363f21 commit ed432aa

File tree

3 files changed

+123
-44
lines changed

3 files changed

+123
-44
lines changed

eng/pipelines/dotnet-framework.yml

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
trigger: none
22
pr: none
33

4-
resources:
5-
repositories:
6-
- repository: VersionsRepo
7-
type: github
8-
endpoint: dotnet
9-
name: dotnet/versions
10-
114
parameters:
125
- name: sourceBuildPipelineRunId
136
displayName: >
@@ -17,32 +10,45 @@ parameters:
1710
building new images, leave this value alone.
1811
type: string
1912
default: $(Build.BuildId)
13+
- name: noCache
14+
displayName: >
15+
Run build with no cache. When this is unchecked, the build will use the
16+
info in the dotnet/versions repo to build only the images which have had
17+
Dockerfile changes or base images updates. When this is checked, all images
18+
will be built regardless of caching status.
19+
type: boolean
20+
default: false
2021

2122
variables:
2223
- template: /eng/pipelines/variables/common.yml@self
23-
parameters:
24-
sourceBuildPipelineRunId: ${{ parameters.sourceBuildPipelineRunId }}
25-
- template: /eng/common/templates/variables/dotnet/secrets.yml@self
24+
- template: /eng/common/templates/variables/dotnet/secrets${{ iif(contains(variables['Build.DefinitionName'], '-official'), '', '-unofficial') }}.yml@self
2625
- name: manifest
2726
value: manifest.json
2827
- name: mcrImageIngestionTimeout
2928
value: "00:30:00"
3029

30+
resources:
31+
repositories:
32+
- repository: VersionsRepo
33+
type: github
34+
endpoint: dotnet
35+
name: dotnet/versions
36+
3137
extends:
32-
template: /eng/common/templates/1es-official.yml@self
38+
template: /eng/common/templates/1es.yml@self
3339
parameters:
34-
serviceConnections:
35-
- name: $(internal-mirror.serviceConnectionName)
36-
- name: $(build.serviceConnectionName)
37-
- name: $(publish.serviceConnectionName)
38-
- name: $(kusto.serviceConnectionName)
39-
- name: $(marStatus.serviceConnectionName)
40+
reposToExcludeFromScanning:
41+
- VersionsRepo
4042
stages:
41-
- template: /eng/common/templates/stages/dotnet/build-test-publish-repo.yml@self
43+
- template: /eng/common/templates/stages/dotnet/publish-config-${{ iif(contains(variables['Build.DefinitionName'], '-official'), 'prod', 'nonprod') }}.yml@self
4244
parameters:
43-
internalProjectName: ${{ variables.internalProjectName }}
44-
publicProjectName: ${{ variables.publicProjectName }}
45-
versionsRepoRef: VersionsRepo
4645
sourceBuildPipelineRunId: ${{ parameters.sourceBuildPipelineRunId }}
47-
windowsAmdBuildJobTimeout: 240
48-
windowsAmdTestJobTimeout: 90
46+
stagesTemplate: /eng/pipelines/stages/dotnet-framework-base.yml@self
47+
stagesTemplateParameters:
48+
versionsRepoRef: VersionsRepo
49+
sourceBuildPipelineRunId: ${{ parameters.sourceBuildPipelineRunId }}
50+
noCache: ${{ parameters.noCache }}
51+
${{ if contains(variables['Build.DefinitionName'], '-official') }}:
52+
additionalServiceConnections:
53+
- name: $(kusto.serviceConnectionName)
54+
- name: $(marStatus.serviceConnectionName)
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
parameters:
2+
- name: publishConfig
3+
type: object
4+
- name: internalProjectName
5+
type: string
6+
- name: publicProjectName
7+
type: string
8+
9+
- name: sourceBuildPipelineRunId
10+
type: string
11+
default: $(Build.BuildId)
12+
- name: versionsRepoRef
13+
type: string
14+
default: ""
15+
- name: noCache
16+
type: boolean
17+
default: false
18+
- name: windowsAmdBuildJobTimeout
19+
default: 240
20+
- name: windowsAmdTestJobTimeout
21+
default: 90
22+
# Additional service connections needed by this pipeline that are not included
23+
# in the publishConfig.
24+
- name: additionalServiceConnections
25+
type: object
26+
default: []
27+
28+
29+
stages:
30+
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
31+
- template: /eng/common/templates/stages/setup-service-connections.yml@self
32+
parameters:
33+
serviceConnections:
34+
- name: ${{ parameters.publishConfig.internalMirrorAcr.serviceConnection.name }}
35+
- name: ${{ parameters.publishConfig.buildAcr.serviceConnection.name }}
36+
- name: ${{ parameters.publishConfig.publishAcr.serviceConnection.name }}
37+
- ${{ each serviceConnection in parameters.additionalServiceConnections }}:
38+
- name: ${{ serviceConnection.name }}
39+
40+
- template: /eng/common/templates/stages/dotnet/build-test-publish-repo.yml@self
41+
parameters:
42+
versionsRepoRef: ${{ parameters.versionsRepoRef }}
43+
sourceBuildPipelineRunId: ${{ parameters.sourceBuildPipelineRunId }}
44+
noCache: ${{ parameters.noCache }}
45+
windowsAmdBuildJobTimeout: ${{ parameters.windowsAmdBuildJobTimeout }}
46+
windowsAmdTestJobTimeout: ${{ parameters.windowsAmdTestJobTimeout }}

eng/pipelines/variables/common.yml

Lines changed: 48 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,52 @@
1-
parameters:
2-
# sourceBuildPipelineRunId should be overridden when skipping a build to run
3-
# tests or publish images that were produced in a different pipeline run.
4-
- name: sourceBuildPipelineRunId
5-
type: string
6-
default: ""
7-
81
variables:
92
- template: /eng/common/templates/variables/dotnet/build-test-publish.yml@self
10-
parameters:
11-
sourceBuildPipelineRunId: ${{ parameters.sourceBuildPipelineRunId }}
12-
- name: publicGitRepoUri
13-
value: https://github.com/microsoft/dotnet-framework-docker
14-
- name: productVersionComponents
3+
4+
- name: "publicGitRepoUri"
5+
value: "https://github.com/microsoft/dotnet-framework-docker"
6+
7+
- name: "productVersionComponents"
158
value: 3
16-
- name: testScriptPath
17-
value: ./tests/run-tests.ps1
18-
- name: testResultsDirectory
19-
value: tests/Microsoft.DotNet.Framework.Docker.Tests/TestResults/
20-
- name: publicSourceBranch
21-
value: main
22-
- name: additionalPublishMcrDocsArgs
9+
10+
- name: "testScriptPath"
11+
value: "./tests/run-tests.ps1"
12+
- name: "testResultsDirectory"
13+
value: "tests/Microsoft.DotNet.Framework.Docker.Tests/TestResults/"
14+
15+
# .NET Framework images only publish from one branch
16+
- name: "publicSourceBranch"
17+
value: "main"
18+
readonly: true
19+
20+
- name: "additionalPublishMcrDocsArgs"
2321
value: "--root /repo/.portal-docs"
24-
- name: publishEolAnnotations
25-
value: true
22+
23+
- ${{ if contains(variables['Build.DefinitionName'], '-official') }}:
24+
- name: "publishEolAnnotations"
25+
value: true
26+
27+
- ${{ else }}:
28+
# Disable EOL annotations for unofficial build
29+
- name: "publishEolAnnotations"
30+
value: false
31+
readonly: true
32+
33+
# Unofficial secrets group has no GitHub token for publishing image info, notifications, or readmes
34+
- name: "publishImageInfo"
35+
value: false
36+
readonly: true
37+
- name: "publishNotificationsEnabled"
38+
value: false
39+
readonly: true
40+
- name: "publishReadme"
41+
value: false
42+
readonly: true
43+
44+
# There aren't test/unofficial Kusto tables for build telemetry yet
45+
- name: "ingestKustoImageInfo"
46+
value: false
47+
readonly: true
48+
49+
# Always run unofficial pipelines in debug mode
50+
- name: "System.Debug"
51+
value: true
52+
readonly: true

0 commit comments

Comments
 (0)