Skip to content

Commit

Permalink
Update common Docker engineering infrastructure with latest
Browse files Browse the repository at this point in the history
  • Loading branch information
dotnet-docker-bot committed Aug 29, 2024
1 parent fb9fba4 commit 669a5e3
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 2 deletions.
39 changes: 39 additions & 0 deletions eng/common/templates/jobs/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ parameters:
jobs:
- job: Publish
pool: ${{ parameters.pool }}
timeoutInMinutes: 90
variables:
- name: imageBuilder.commonCmdArgs
value: >
Expand All @@ -27,6 +28,8 @@ jobs:
value: $(artifactsPath)/imageInfo
- name: sourceBuildIdOutputDir
value: $(Build.ArtifactStagingDirectory)/sourceBuildId
- name: imageInfoRawContentUrl
value: https://raw.githubusercontent.com/$(gitHubVersionsRepoInfo.org)/$(gitHubVersionsRepoInfo.repo)/$(gitHubVersionsRepoInfo.branch)/$(gitHubImageInfoVersionsPath)
- ${{ parameters.customPublishVariables }}
steps:
- template: /eng/common/templates/steps/retain-build.yml@self
Expand Down Expand Up @@ -103,6 +106,10 @@ jobs:
parameters:
dryRunArg: $(dryRunArg)
condition: and(succeeded(), eq(variables['publishReadme'], 'true'))
- script: |
mkdir -p $(Build.ArtifactStagingDirectory)/eol-annotation-data
curl -fSL --output $(Build.ArtifactStagingDirectory)/eol-annotation-data/image-info-old.json $(imageInfoRawContentUrl)
displayName: Download Original Image Info File
- script: >
$(runImageBuilderCmd) publishImageInfo
'$(imageInfoContainerDir)/image-info.json'
Expand All @@ -117,6 +124,8 @@ jobs:
$(imageBuilder.commonCmdArgs)
condition: and(succeeded(), eq(variables['publishImageInfo'], 'true'))
displayName: Publish Image Info
- script: curl -fSL --output $(Build.ArtifactStagingDirectory)/eol-annotation-data/image-info-new.json $(imageInfoRawContentUrl)
displayName: Download Updated Image Info File
- template: /eng/common/templates/steps/run-imagebuilder.yml@self
parameters:
displayName: Ingest Kusto Image Info
Expand All @@ -134,6 +143,33 @@ jobs:
--architecture '*'
$(dryRunArg)
$(imageBuilder.commonCmdArgs)
- template: /eng/common/templates/steps/run-imagebuilder.yml@self
parameters:
displayName: Generate EOL Annotation Data
serviceConnection: $(publish.serviceConnectionName)
internalProjectName: internal
condition: and(succeeded(), eq(variables['publishEolAnnotations'], 'true'))
args: >
generateEolAnnotationData
'$(artifactsPath)/eol-annotation-data/eol-annotation-data.json'
'$(artifactsPath)/eol-annotation-data/image-info-old.json'
'$(artifactsPath)/eol-annotation-data/image-info-new.json'
'$(publishRepoPrefix)'
'$(acr.server)'
$(generateEolAnnotationDataExtraOptions)
$(dryRunArg)
- template: /eng/common/templates/steps/publish-artifact.yml@self
parameters:
path: $(Build.ArtifactStagingDirectory)/eol-annotation-data
artifactName: eol-annotation-data
displayName: Publish EOL Annotation Data Artifact
internalProjectName: internal
publicProjectName: public
condition: and(succeeded(), eq(variables['publishEolAnnotations'], 'true'))
- template: /eng/common/templates/steps/annotate-eol-digests.yml@self
parameters:
internalProjectName: ${{ parameters.internalProjectName }}
dataFile: $(artifactsPath)/eol-annotation-data/eol-annotation-data.json
- script: >
$(runImageBuilderCmd) postPublishNotification
'$(publishNotificationRepoName)'
Expand All @@ -154,6 +190,9 @@ jobs:
--task "Wait for MCR Doc Ingestion (Authenticated)"
--task "Publish Image Info"
--task "Ingest Kusto Image Info (Authenticated)"
--task "Generate EOL Annotation Data (Authenticated)"
--task "Annotate EOL Images (Authenticated)"
--task "Wait for Annotation Ingestion (Authenticated)"
$(dryRunArg)
$(imageBuilder.commonCmdArgs)
displayName: Post Publish Notification
Expand Down
5 changes: 4 additions & 1 deletion eng/common/templates/steps/annotate-eol-digests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ steps:
displayName: Annotate EOL Images
serviceConnection: $(publish.serviceConnectionName)
internalProjectName: internal
condition: and(succeeded(), eq(variables['publishEolAnnotations'], 'true'))
args: >
annotateEolDigests
/repo/${{ parameters.dataFile }}
${{ parameters.dataFile }}
$(acr.server)
$(publishRepoPrefix)
$(artifactsPath)/annotation-digests/annotation-digests.txt
Expand All @@ -22,11 +23,13 @@ steps:
displayName: Publish Annotation Digests List
internalProjectName: internal
publicProjectName: public
condition: and(succeeded(), eq(variables['publishEolAnnotations'], 'true'))
- template: /eng/common/templates/steps/run-imagebuilder.yml@self
parameters:
displayName: Wait for Annotation Ingestion
serviceConnection: $(marStatus.serviceConnectionName)
internalProjectName: internal
condition: and(succeeded(), eq(variables['publishEolAnnotations'], 'true'))
args: >
waitForMarAnnotationIngestion
$(artifactsPath)/annotation-digests/annotation-digests.txt
2 changes: 2 additions & 0 deletions eng/common/templates/variables/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ variables:
value: ""
- name: imageBuilderDockerRunExtraOptions
value: ""
- name: generateEolAnnotationDataExtraOptions
value: ""
- name: productVersionComponents
value: 2
- name: imageInfoVariant
Expand Down
2 changes: 1 addition & 1 deletion eng/common/templates/variables/docker-images.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variables:
imageNames.imageBuilderName: mcr.microsoft.com/dotnet-buildtools/image-builder:2516503
imageNames.imageBuilderName: mcr.microsoft.com/dotnet-buildtools/image-builder:2525416
imageNames.imageBuilder: $(imageNames.imageBuilderName)
imageNames.imageBuilder.withrepo: imagebuilder-withrepo:$(Build.BuildId)-$(System.JobId)
imageNames.testRunner: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner2.0-docker-testrunner
Expand Down

0 comments on commit 669a5e3

Please sign in to comment.