diff --git a/.pipelines/cg-pipeline.yaml b/.pipelines/cg-pipeline.yaml index 691d3669c4..58a967ebc7 100644 --- a/.pipelines/cg-pipeline.yaml +++ b/.pipelines/cg-pipeline.yaml @@ -215,12 +215,27 @@ stages: - checkout: self fetchTags: true - - task: Docker@2 - displayName: Docker Login + - task: DownloadPipelineArtifact@2 inputs: - containerRegistry: $(WINDOWS_BUILDER_REGISTRY) - command: "login" - addPipelineData: false + buildType: "specific" + project: $(BUILDER_ADO_PROECT) + definition: $(BUILDER_ADO_DEFINITION_ID) # Replace with your build definition ID + buildId: $(BUILDER_ADO_BUILD_ID) + artifactName: $(BUILDER_ADO_ARTIFACTE_NAME) # Replace with your artifact name + itemPattern: "**/*builder*.tar" + downloadPath: '$(Pipeline.Workspace)\artifacts' + + - task: PowerShell@2 + displayName: "Load Builder Image" + inputs: + targetType: "inline" + script: | + $rootDir = "$(Pipeline.Workspace)\artifacts" + $dockerImages = Get-ChildItem -Path $rootDir -Recurse -Filter *.tar + foreach ($image in $dockerImages) { + Write-Host "Loading Docker image: $($image.FullName)" + docker load -i $image.FullName + } - task: PowerShell@2 displayName: "Build Retina Windows Image (LTSC2022)"