Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .pipelines/build/manifests.jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,31 @@ jobs:
image_repository: ${{ job_data.templateContext.name }}
image_tag: ${{ job_data.templateContext.image_tag }}
manifest_data: $(MANIFEST_JSON)

- job: ${{ job_data.job }}_package_manifest
displayName: "Package Image Manifest - ${{ job_data.job }}"
dependsOn:
- ${{ job_data.job }}_publish_manifest
pool:
type: linux
variables:
LinuxContainerImage: 'mcr.microsoft.com/onebranch/azurelinux/build:3.0'
ob_outputDirectory: $(Build.SourcesDirectory)/out
ob_git_checkout: false
steps:
# Leverage new feature from https://github.com/oras-project/oras/issues/1366 in the future
# :v1 has no impact, but is required for oras
# Copy manifest from ACR
- bash: |
oras copy $(ACR).azurecr.io/$(IMAGE_REPO_PATH)/${{ job_data.templateContext.name }}:${{ job_data.templateContext.image_tag }} \
--to-oci-layout ./${{ job_data.templateContext.image_tag }}_artifact:v1
name: oras_copy
displayName: "Oras Copy"

# Generate tarball
- bash: |
TARGET_DIR=$(ob_outputDirectory)
mkdir -p "$TARGET_DIR"
tar -cvzf ${TARGET_DIR}/${{ job_data.templateContext.image_tag }}_artifact.tar.gz ./${{ job_data.templateContext.image_tag }}_artifact
name: tarball
displayName: "Generate tarball"
Loading