Skip to content

Commit af812a5

Browse files
dotnet-docker-botlbussell
authored andcommitted
Update common Docker engineering infrastructure with latest
1 parent 8b3afd5 commit af812a5

File tree

7 files changed

+59
-41
lines changed

7 files changed

+59
-41
lines changed

eng/common/templates/jobs/build-images.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ parameters:
1313

1414
jobs:
1515
- job: ${{ parameters.name }}
16-
condition: and(${{ parameters.matrix }}, not(canceled()), or(in(dependencies.PreBuildValidation.result, 'Succeeded', 'SucceededWithIssues', 'Skipped'), eq(${{ parameters.isInternalServicingValidation }}, 'true')))
16+
condition: and(${{ parameters.matrix }}, not(canceled()), in(dependencies.PreBuildValidation.result, 'Succeeded', 'SucceededWithIssues', 'Skipped'))
1717
dependsOn:
18-
- ${{ if eq(parameters.isInternalServicingValidation, 'false') }}:
19-
- PreBuildValidation
18+
- PreBuildValidation
2019
- CopyBaseImages
2120
- GenerateBuildMatrix
2221
pool: ${{ parameters.pool }}

eng/common/templates/jobs/post-build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
- template: /eng/common/templates/steps/download-build-artifact.yml@self
1818
parameters:
1919
targetPath: $(Build.ArtifactStagingDirectory)
20+
# This can fail if no build jobs ran to produce any artifacts
21+
continueOnError: true
2022
- powershell: |
2123
# Move all image-info artifacts to their own directory
2224
New-Item -ItemType Directory -Path $(imageInfosHostDir)

eng/common/templates/jobs/publish.yml

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ jobs:
4444
parameters:
4545
targetPath: $(imageInfoHostDir)
4646
artifactName: image-info
47+
# This can fail in scenarios where no build jobs have run to produce any artifacts
48+
continueOnError: true
4749
- template: /eng/common/templates/steps/set-image-info-path-var.yml@self
4850
parameters:
4951
publicSourceBranch: $(publicSourceBranch)
@@ -107,21 +109,22 @@ jobs:
107109
- script: mkdir -p $(Build.ArtifactStagingDirectory)/eol-annotation-data
108110
displayName: Create EOL Annotation Data Directory
109111
- script: >
110-
$(runImageBuilderCmd) publishImageInfo
111-
'$(imageInfoContainerDir)/image-info.json'
112-
'$(gitHubVersionsRepoInfo.userName)'
113-
'$(gitHubVersionsRepoInfo.email)'
114-
'$(gitHubVersionsRepoInfo.accessToken)'
115-
--git-owner '$(gitHubVersionsRepoInfo.org)'
116-
--git-repo '$(gitHubVersionsRepoInfo.repo)'
117-
--git-branch '$(gitHubVersionsRepoInfo.branch)'
118-
--git-path '$(gitHubImageInfoVersionsPath)'
119-
--image-info-orig-path '$(artifactsPath)/eol-annotation-data/image-info-old.json'
120-
--image-info-update-path '$(artifactsPath)/eol-annotation-data/image-info-new.json'
112+
curl -fSL
113+
--output $(imageInfoHostDir)/full-image-info-orig.json
114+
https://raw.githubusercontent.com/$(gitHubVersionsRepoInfo.org)/$(gitHubVersionsRepoInfo.repo)/refs/heads/$(gitHubVersionsRepoInfo.branch)/$(gitHubImageInfoVersionsPath)
115+
condition: and(succeeded(), eq(variables['publishImageInfo'], 'true'))
116+
displayName: Download Latest Image Info
117+
- script: >
118+
$(runImageBuilderCmd) mergeImageInfo
119+
$(imageInfoContainerDir)
120+
$(imageInfoContainerDir)/full-image-info-new.json
121+
$(manifestVariables)
121122
$(dryRunArg)
122-
$(imageBuilder.commonCmdArgs)
123+
--manifest $(manifest)
124+
--publish
125+
--initial-image-info-path $(imageInfoContainerDir)/full-image-info-orig.json
123126
condition: and(succeeded(), eq(variables['publishImageInfo'], 'true'))
124-
displayName: Publish Image Info
127+
displayName: Merge Image Info
125128
- template: /eng/common/templates/steps/run-imagebuilder.yml@self
126129
parameters:
127130
displayName: Ingest Kusto Image Info
@@ -148,8 +151,8 @@ jobs:
148151
args: >
149152
generateEolAnnotationData
150153
'$(artifactsPath)/eol-annotation-data/eol-annotation-data.json'
151-
'$(artifactsPath)/eol-annotation-data/image-info-old.json'
152-
'$(artifactsPath)/eol-annotation-data/image-info-new.json'
154+
'$(imageInfoContainerDir)/full-image-info-orig.json'
155+
'$(imageInfoContainerDir)/full-image-info-new.json'
153156
'$(acr.server)'
154157
'$(publishRepoPrefix)'
155158
$(generateEolAnnotationDataExtraOptions)
@@ -166,6 +169,20 @@ jobs:
166169
parameters:
167170
internalProjectName: ${{ parameters.internalProjectName }}
168171
dataFile: $(artifactsPath)/eol-annotation-data/eol-annotation-data.json
172+
- script: >
173+
$(runImageBuilderCmd) publishImageInfo
174+
'$(imageInfoContainerDir)/full-image-info-new.json'
175+
'$(gitHubVersionsRepoInfo.userName)'
176+
'$(gitHubVersionsRepoInfo.email)'
177+
'$(gitHubVersionsRepoInfo.accessToken)'
178+
--git-owner '$(gitHubVersionsRepoInfo.org)'
179+
--git-repo '$(gitHubVersionsRepoInfo.repo)'
180+
--git-branch '$(gitHubVersionsRepoInfo.branch)'
181+
--git-path '$(gitHubImageInfoVersionsPath)'
182+
$(dryRunArg)
183+
$(imageBuilder.commonCmdArgs)
184+
condition: and(succeeded(), eq(variables['publishImageInfo'], 'true'))
185+
displayName: Publish Image Info
169186
- script: >
170187
$(runImageBuilderCmd) postPublishNotification
171188
'$(publishNotificationRepoName)'

eng/common/templates/stages/build-test-publish-repo.yml

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -51,25 +51,24 @@ stages:
5151
- stage: Build
5252
condition: and(succeeded(), contains(variables['stages'], 'build'))
5353
jobs:
54-
- ${{ if eq(parameters.isInternalServicingValidation, 'false') }}:
55-
- template: /eng/common/templates/jobs/test-images-linux-client.yml@self
56-
parameters:
57-
name: PreBuildValidation
58-
pool: ${{ parameters.linuxAmd64Pool }}
59-
testJobTimeout: ${{ parameters.linuxAmdTestJobTimeout }}
60-
preBuildValidation: true
61-
internalProjectName: ${{ parameters.internalProjectName }}
62-
customInitSteps:
63-
- ${{ parameters.customTestInitSteps }}
64-
# These variables are normally set by the matrix. Since this test job is not generated
65-
# by a matrix, we need to set them manually. They can be set to empty values since their
66-
# values aren't actually used for the pre-build tests.
67-
- powershell: |
68-
echo "##vso[task.setvariable variable=productVersion]"
69-
echo "##vso[task.setvariable variable=imageBuilderPaths]"
70-
echo "##vso[task.setvariable variable=osVersions]"
71-
echo "##vso[task.setvariable variable=architecture]"
72-
displayName: Initialize Test Variables
54+
- template: /eng/common/templates/jobs/test-images-linux-client.yml@self
55+
parameters:
56+
name: PreBuildValidation
57+
pool: ${{ parameters.linuxAmd64Pool }}
58+
testJobTimeout: ${{ parameters.linuxAmdTestJobTimeout }}
59+
preBuildValidation: true
60+
internalProjectName: ${{ parameters.internalProjectName }}
61+
customInitSteps:
62+
- ${{ parameters.customTestInitSteps }}
63+
# These variables are normally set by the matrix. Since this test job is not generated
64+
# by a matrix, we need to set them manually. They can be set to empty values since their
65+
# values aren't actually used for the pre-build tests.
66+
- powershell: |
67+
echo "##vso[task.setvariable variable=productVersion]"
68+
echo "##vso[task.setvariable variable=imageBuilderPaths]"
69+
echo "##vso[task.setvariable variable=osVersions]"
70+
echo "##vso[task.setvariable variable=architecture]"
71+
displayName: Initialize Test Variables
7372
- template: /eng/common/templates/jobs/copy-base-images-staging.yml@self
7473
parameters:
7574
name: CopyBaseImages
@@ -344,7 +343,6 @@ stages:
344343
condition: "
345344
and(
346345
not(canceled()),
347-
ne(stageDependencies.Post_Build.outputs['Build.MergeImageInfoFiles.noImageInfos'], 'true'),
348346
and(
349347
contains(variables['stages'], 'publish'),
350348
or(

eng/common/templates/steps/download-build-artifact.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ parameters:
22
targetPath: ""
33
artifactName: ""
44
condition: true
5+
continueOnError: false
56

67
steps:
78
- task: DownloadPipelineArtifact@1
@@ -15,3 +16,4 @@ steps:
1516
artifactName: ${{ parameters.artifactName }}
1617
displayName: Download Build Artifact(s)
1718
condition: and(succeeded(), ${{ parameters.condition }})
19+
continueOnError: ${{ parameters.continueOnError }}

eng/common/templates/steps/init-docker-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ steps:
5151
$authedImageBuilderCmds = @(
5252
'$env:AZURE_TENANT_ID = $env:tenantId'
5353
'$env:AZURE_CLIENT_ID = $env:servicePrincipalId'
54-
'$env:AZURE_FEDERATED_TOKEN_FILE' + " = $tokenHostFilePath"
54+
'$env:AZURE_FEDERATED_TOKEN_FILE = ' + "'" + "$tokenHostFilePath" + "'"
5555
$runImageBuilderCmd
5656
)
5757
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
variables:
2-
imageNames.imageBuilderName: mcr.microsoft.com/dotnet-buildtools/image-builder:2570468
2+
imageNames.imageBuilderName: mcr.microsoft.com/dotnet-buildtools/image-builder:2613921
33
imageNames.imageBuilder: $(imageNames.imageBuilderName)
44
imageNames.imageBuilder.withrepo: imagebuilder-withrepo:$(Build.BuildId)-$(System.JobId)
5-
imageNames.testRunner: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner2.0-docker-testrunner
5+
imageNames.testRunner: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux3.0-docker-testrunner
66
imageNames.testRunner.withrepo: testrunner-withrepo:$(Build.BuildId)-$(System.JobId)

0 commit comments

Comments
 (0)