diff --git a/eng/docker-tools/CHANGELOG.md b/eng/docker-tools/CHANGELOG.md index c278cbc4..76a9ec60 100644 --- a/eng/docker-tools/CHANGELOG.md +++ b/eng/docker-tools/CHANGELOG.md @@ -4,6 +4,14 @@ All breaking changes and new features in `eng/docker-tools` will be documented i --- +## 2026-03-25: Manifest list creation moved to Post_Build + +- Issue: [#2002](https://github.com/dotnet/docker-tools/issues/2002) + +Manifest lists are now created during `Post_Build` instead of during `Publish`. They are copied to the publish registry via ACR import along with the platform images, rather than being recreated from scratch during publish. + +--- + ## 2026-03-18: CG build template supports skipping .NET SDK installation - Issue: [#2029](https://github.com/dotnet/docker-tools/issues/2029) diff --git a/eng/docker-tools/templates/jobs/post-build.yml b/eng/docker-tools/templates/jobs/post-build.yml index 8159872a..32b9c799 100644 --- a/eng/docker-tools/templates/jobs/post-build.yml +++ b/eng/docker-tools/templates/jobs/post-build.yml @@ -20,6 +20,12 @@ jobs: dockerClientOS: linux customInitSteps: ${{ parameters.customInitSteps }} publishConfig: ${{ parameters.publishConfig }} + - ${{ if parameters.publishConfig }}: + - template: /eng/docker-tools/templates/steps/reference-service-connections.yml@self + parameters: + publishConfig: ${{ parameters.publishConfig }} + usesRegistries: + - ${{ parameters.publishConfig.BuildRegistry.server }} - template: /eng/docker-tools/templates/steps/download-build-artifact.yml@self parameters: targetPath: $(Build.ArtifactStagingDirectory) @@ -75,6 +81,21 @@ jobs: $(manifestVariables) name: MergeImageInfoFiles displayName: Merge Image Info Files + - ${{ if parameters.publishConfig }}: + - template: /eng/docker-tools/templates/steps/run-imagebuilder.yml@self + parameters: + displayName: Create Manifest Lists + internalProjectName: ${{ parameters.internalProjectName }} + condition: and(succeeded(), ne(variables['MergeImageInfoFiles.noImageInfos'], 'true'), ne(variables['Build.Reason'], 'PullRequest')) + args: >- + createManifestList + '$(imageInfosContainerDir)$(imageInfosOutputSubDir)/image-info.json' + --repo-prefix '${{ parameters.publishConfig.BuildRegistry.repoPrefix }}' + --os-type '*' + --architecture '*' + --manifest '$(manifest)' + --registry-override '${{ parameters.publishConfig.BuildRegistry.server }}' + $(manifestVariables) - template: /eng/docker-tools/templates/steps/publish-artifact.yml@self parameters: condition: and(succeeded(), ne(variables['MergeImageInfoFiles.noImageInfos'], 'true')) diff --git a/eng/docker-tools/templates/jobs/publish.yml b/eng/docker-tools/templates/jobs/publish.yml index 92f98b22..4b2aeacf 100644 --- a/eng/docker-tools/templates/jobs/publish.yml +++ b/eng/docker-tools/templates/jobs/publish.yml @@ -118,21 +118,6 @@ jobs: $(imageBuilder.pathArgs) $(imageBuilder.commonCmdArgs) - - template: /eng/docker-tools/templates/steps/run-imagebuilder.yml@self - parameters: - displayName: Publish Manifest - internalProjectName: ${{ parameters.internalProjectName }} - dockerClientOS: ${{ parameters.dockerClientOS }} - args: >- - publishManifest - '$(imageInfoContainerDir)/image-info.json' - --repo-prefix '${{ parameters.publishConfig.PublishRegistry.repoPrefix }}' - --os-type '*' - --architecture '*' - $(dryRunArg) - $(imageBuilder.pathArgs) - $(imageBuilder.commonCmdArgs) - - template: /eng/docker-tools/templates/steps/publish-artifact.yml@self parameters: path: $(imageInfoHostDir) @@ -270,7 +255,6 @@ jobs: '$(gitHubNotificationsRepoInfo.repo)' --repo-prefix '${{ parameters.publishConfig.PublishRegistry.repoPrefix }}' --task "🟪 Copy Images" - --task "🟪 Publish Manifest" --task "🟪 Wait for Image Ingestion" --task "🟪 Publish Readmes" --task "🟪 Wait for MCR Doc Ingestion" diff --git a/eng/docker-tools/templates/variables/docker-images.yml b/eng/docker-tools/templates/variables/docker-images.yml index ad40c7f4..a7f526d3 100644 --- a/eng/docker-tools/templates/variables/docker-images.yml +++ b/eng/docker-tools/templates/variables/docker-images.yml @@ -1,5 +1,5 @@ variables: - imageNames.imageBuilderName: mcr.microsoft.com/dotnet-buildtools/image-builder:2928776 + imageNames.imageBuilderName: mcr.microsoft.com/dotnet-buildtools/image-builder:2936017 imageNames.imageBuilder: $(imageNames.imageBuilderName) imageNames.imageBuilder.withrepo: imagebuilder-withrepo:$(Build.BuildId)-$(System.JobId) imageNames.testRunner: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux3.0-docker-testrunner