From 9bc908313334eadf1dfb947e141d5cba39b05d58 Mon Sep 17 00:00:00 2001 From: Gaurav Mehta Date: Thu, 21 Dec 2023 08:48:35 +1100 Subject: [PATCH] manifest publishing add drone pipeline for publishing multi-arch manifests --- .drone.yml | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 58 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 97f5a6e0..02ddb38f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -37,7 +37,7 @@ steps: password: from_secret: docker_password repo: "rancher/harvester-node-disk-manager" - tag: ${DRONE_BRANCH}-head + tag: ${DRONE_BRANCH}-head-linux-amd64 username: from_secret: docker_username when: @@ -55,7 +55,7 @@ steps: password: from_secret: docker_password repo: "rancher/harvester-node-disk-manager" - tag: "${DRONE_TAG}" + tag: "${DRONE_TAG}-linux-amd64" username: from_secret: docker_username when: @@ -111,7 +111,7 @@ steps: password: from_secret: docker_password repo: "rancher/harvester-node-disk-manager" - tag: ${DRONE_BRANCH}-head + tag: ${DRONE_BRANCH}-head-linux-arm64 username: from_secret: docker_username when: @@ -129,7 +129,7 @@ steps: password: from_secret: docker_password repo: "rancher/harvester-node-disk-manager" - tag: "${DRONE_TAG}" + tag: "${DRONE_TAG}-linux-arm64" username: from_secret: docker_username when: @@ -145,3 +145,57 @@ volumes: - name: docker host: path: /var/run/docker.sock + +--- +kind: pipeline +name: manifest + +env: + IMAGE_NAME: "rancher/harvester-node-disk-manager" + +steps: + - name: push-manifest-head + image: plugins/manifest + settings: + username: + from_secret: docker_username + password: + from_secret: docker_password + target: "${IMAGE_NAME}:${DRONE_BRANCH}-head" + template: "${IMAGE_NAME}:${DRONE_BRANCH}-head-OS-ARCH" + ignore_missing: true + platforms: + - linux/amd64 + - linux/arm64 + when: + ref: + include: + - refs/heads/master + - refs/heads/release/v* + event: + - push + + - name: push-manifest-tag + image: plugins/manifest + settings: + username: + from_secret: docker_username + password: + from_secret: docker_password + target: "${IMAGE_NAME}:${DRONE_TAG}" + template: "${IMAGE_NAME}:${DRONE_TAG}-OS-ARCH" + ignore_missing: true + platforms: + - linux/amd64 + - linux/arm64 + when: + ref: + include: + - refs/head/master + - refs/tags/* + event: + - tag + +depends_on: + - amd64 + - arm64 \ No newline at end of file