File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 3636 image_repository : ${{ job_data.templateContext.name }}
3737 image_tag : ${{ job_data.templateContext.image_tag }}
3838 manifest_data : $(MANIFEST_JSON)
39+
40+ - job : ${{ job_data.job }}_package_manifest
41+ displayName : " Package Image Manifest - ${{ job_data.job }}"
42+ dependsOn :
43+ - ${{ job_data.job }}_publish_manifest
44+ pool :
45+ type : linux
46+ variables :
47+ LinuxContainerImage : ' mcr.microsoft.com/onebranch/azurelinux/build:3.0'
48+ ob_outputDirectory : $(Build.SourcesDirectory)/out
49+ ob_git_checkout : false
50+ steps :
51+ # Leverage new feature from https://github.com/oras-project/oras/issues/1366 in the future
52+ # :v1 has no impact, but is required for oras
53+ # Copy manifest from ACR
54+ - bash : |
55+ oras copy $(ACR).azurecr.io/$(IMAGE_REPO_PATH)/${{ job_data.templateContext.name }}:${{ job_data.templateContext.image_tag }} \
56+ --to-oci-layout ./${{ job_data.templateContext.image_tag }}_artifact:v1
57+ name: oras_copy
58+ displayName: "Oras Copy"
59+
60+ # Generate tarball
61+ - bash : |
62+ TARGET_DIR=$(ob_outputDirectory)
63+ mkdir -p "$TARGET_DIR"
64+ tar -cvzf ${TARGET_DIR}/${{ job_data.templateContext.image_tag }}_artifact.tar.gz ./${{ job_data.templateContext.image_tag }}_artifact
65+ name: tarball
66+ displayName: "Generate tarball"
You can’t perform that action at this time.
0 commit comments