diff --git a/.pipelines/templates/.builder-release-template.yaml b/.pipelines/templates/.builder-release-template.yaml index f042c6472d1..d3afc8de600 100644 --- a/.pipelines/templates/.builder-release-template.yaml +++ b/.pipelines/templates/.builder-release-template.yaml @@ -12,6 +12,7 @@ steps: lfs: false condition: eq('${{ parameters.useOverrides }}', true) - checkout: self + fetchDepth: 1 - bash: | set -ex m="linuxVhdMode" && \ @@ -30,7 +31,7 @@ steps: vstsFeed: ASMPackages vstsFeedPackage: asc-baseline vstsPackageVersion: '1.1.0-268' - downloadDirectory: vhdbuilder/packer + downloadDirectory: AgentBaker/vhdbuilder/packer - task: DownloadPipelineArtifact@2 displayName: 'Download Kata CC UVM artifact' inputs: @@ -49,11 +50,12 @@ steps: **/kata-containers.img** **/kata-containers-initrd-base.img** **/reference-info-base64** - downloadPath: $(Build.SourcesDirectory) + downloadPath: $(Build.SourcesDirectory)/AgentBaker/ condition: or(eq(variables.OS_SKU, 'CBLMariner'), eq(variables.OS_SKU, 'AzureLinux')) - bash: | + set -ex pwd - ls -R + ls -R AgentBaker displayName: show Directory - bash: | set -ex @@ -65,6 +67,7 @@ steps: popd cue export ./schemas/manifest.cue > ./parts/linux/cloud-init/artifacts/manifest.json displayName: setup cue + workingDirectory: ${Build.SourcesDirectory)/AgentBaker/ - bash: | set -ex SKU_NAME=${OS_VERSION} && \ @@ -81,6 +84,7 @@ steps: SKU_NAME=$(echo ${SKU_NAME} | tr -d '.') && \ echo "##vso[task.setvariable variable=SKU_NAME]$SKU_NAME" echo "Set SKU_NAME to $SKU_NAME" + workingDirectory: ${Build.SourcesDirectory)/AgentBaker/ displayName: Set SKU Name - bash: | set -ex @@ -125,6 +129,7 @@ steps: -e AZURE_MSI_RESOURCE_STRING=${AZURE_MSI_RESOURCE_STRING} \ ${CONTAINER_IMAGE} make -f packer.mk run-packer retryCountOnTaskFailure: 3 + workingDirectory: ${Build.SourcesDirectory)/AgentBaker/ displayName: Building VHD - bash: | set -ex @@ -149,6 +154,7 @@ steps: -e ENABLE_TRUSTED_LAUNCH=${ENABLE_TRUSTED_LAUNCH} \ ${CONTAINER_IMAGE} make -f packer.mk scanning-vhd retryCountOnTaskFailure: 2 + workingDirectory: ${Build.SourcesDirectory)/AgentBaker/ displayName: Scanning VHD - script: | set -ex @@ -181,9 +187,11 @@ steps: -e GIT_BRANCH=$(Build.SourceBranch) \ ${CONTAINER_IMAGE} make -f packer.mk test-building-vhd displayName: Run VHD Tests + workingDirectory: ${Build.SourcesDirectory)/AgentBaker/ - task: Bash@3 inputs: targetType: 'inline' + workingDirectory: ${Build.SourcesDirectory)/AgentBaker/ script: | set -ex IS_NOT_1804=$( [[ "${OS_VERSION}" != "18.04" ]] && echo true || echo false ) && \ @@ -205,7 +213,7 @@ steps: displayName: Copy trivy table - task: PublishPipelineArtifact@0 inputs: - artifactName: 'vhd-release-notes-${{ parameters.artifactName }}' + artifactName: 'AgentBaker/vhd-release-notes-${{ parameters.artifactName }}' targetPath: 'release-notes.txt' displayName: publish release notes - task: CopyFiles@2 @@ -216,12 +224,12 @@ steps: displayName: Copy release notes - task: PublishPipelineArtifact@0 inputs: - artifactName: 'vhd-image-bom-${{ parameters.artifactName }}' + artifactName: 'AgentBaker/vhd-image-bom-${{ parameters.artifactName }}' targetPath: 'image-bom.json' displayName: publish container image list - task: PublishPipelineArtifact@1 inputs: - artifactName: 'build-performance-data-${{ parameters.artifactName }}' + artifactName: 'AgentBaker/build-performance-data-${{ parameters.artifactName }}' targetPath: 'vhd-build-performance-data.json' displayName: Publish Build Performance Data condition: succeeded() @@ -258,6 +266,7 @@ steps: ${CONTAINER_IMAGE} make -f packer.mk cleanup displayName: Clean Up Packer Generated Resources condition: always() + workingDirectory: ${Build.SourcesDirectory)/AgentBaker/ - bash: | set -ex echo MODE=$(MODE) && \ @@ -280,6 +289,7 @@ steps: ${CONTAINER_IMAGE} make -f packer.mk convert-sig-to-classic-storage-account-blob displayName: Convert Shared Image Gallery To VHD Blob In Classic Storage Account condition: and(succeeded(), eq(variables.DRY_RUN, 'False')) + workingDirectory: ${Build.SourcesDirectory)/AgentBaker/ - bash: | set -ex echo MODE=$(MODE) && \ @@ -311,10 +321,11 @@ steps: ${CONTAINER_IMAGE} make -f packer.mk generate-sas displayName: Getting Shared Access Signature URI condition: and(succeeded(), eq(variables.DRY_RUN, 'False')) + workingDirectory: ${Build.SourcesDirectory)/AgentBaker/ - task: PublishPipelineArtifact@1 displayName: Publish publishing-info inputs: - artifactName: 'publishing-info-${{ parameters.artifactName }}' + artifactName: 'AgentBaker/publishing-info-${{ parameters.artifactName }}' targetPath: 'vhd-publishing-info.json' condition: and(succeeded(), eq(variables.DRY_RUN, 'False')) - task: CopyFiles@2