From 2214b9f5a0adbbb86c41ede03aeeedab11a331af Mon Sep 17 00:00:00 2001 From: Connor Kuehl Date: Thu, 11 Jan 2024 16:42:09 -0600 Subject: [PATCH] Update Drone CI to build and push webhook Signed-off-by: Connor Kuehl --- .drone.yml | 122 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) diff --git a/.drone.yml b/.drone.yml index 3178359e..c7205abe 100644 --- a/.drone.yml +++ b/.drone.yml @@ -55,6 +55,46 @@ steps: event: - tag + - name: docker-publish-master-webhook + image: plugins/docker + settings: + build_args: + - ARCH=amd64 + - VERSION=${DRONE_BRANCH}-${DRONE_COMMIT_SHA:0:8}-head + dockerfile: package/Dockerfile.webhook + password: + from_secret: docker_password + repo: "rancher/harvester-node-manager-webhook" + tag: "${DRONE_BRANCH}-head-linux-amd64" + username: + from_secret: docker_username + when: + ref: + include: + - refs/heads/master + - refs/heads/release/v* + event: + - push + + - name: docker-publish-webhook + image: plugins/docker + settings: + dockerfile: package/Dockerfile.webhook + password: + from_secret: docker_password + repo: "rancher/harvester-node-manager-webhook" + tag: "${DRONE_TAG}-linux-amd64" + username: + from_secret: docker_username + when: + instance: + - drone-publish.rancher.io + ref: + - refs/head/master + - refs/tags/* + event: + - tag + volumes: - name: docker host: @@ -117,6 +157,46 @@ steps: event: - tag + - name: docker-publish-master-webhook + image: plugins/docker + settings: + build_args: + - ARCH=arm64 + - VERSION=${DRONE_BRANCH}-${DRONE_COMMIT_SHA:0:8}-head + dockerfile: package/Dockerfile.webhook + password: + from_secret: docker_password + repo: "rancher/harvester-node-manager-webhook" + tag: "${DRONE_BRANCH}-head-linux-arm64" + username: + from_secret: docker_username + when: + ref: + include: + - refs/heads/master + - refs/heads/release/v* + event: + - push + + - name: docker-publish-webhook + image: plugins/docker + settings: + dockerfile: package/Dockerfile.webhook + password: + from_secret: docker_password + repo: "rancher/harvester-node-manager-webhook" + tag: "${DRONE_TAG}-linux-arm64" + username: + from_secret: docker_username + when: + instance: + - drone-publish.rancher.io + ref: + - refs/head/master + - refs/tags/* + event: + - tag + volumes: - name: docker host: @@ -169,6 +249,48 @@ steps: event: - tag + - name: push-manifest-webhook-head + image: plugins/manifest + settings: + username: + from_secret: docker_username + password: + from_secret: docker_password + target: "rancher/harvester-node-manager-webhook:${DRONE_BRANCH}-head" + template: "rancher/harvester-node-manager-webhook:${DRONE_BRANCH}-head-OS-ARCH" + ignore_missing: true + platforms: + - linux/amd64 + - linux/arm64 + when: + ref: + include: + - refs/head/master + - refs/tags/* + event: + - push + + - name: push-manifest-webhook-tag + image: plugins/manifest + settings: + username: + from_secret: docker_username + password: + from_secret: docker_password + target: "rancher/harvester-node-manager-webhook:${DRONE_TAG}-head" + template: "rancher/harvester-node-manager-webhook:${DRONE_TAG}-head-OS-ARCH" + ignore_missing: true + platforms: + - linux/amd64 + - linux/arm64 + when: + ref: + include: + - refs/head/master + - refs/tags/* + event: + - tag + depends_on: - amd64 - arm64