From 578ff75e2b05c58aa342ceb02629613dfb9c5ee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20V=C3=B5sandi?= Date: Wed, 12 Oct 2022 10:47:02 +0300 Subject: [PATCH] Add .drone.yml --- .drone.yml | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ plugin.sh | 1 + 2 files changed, 72 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..cc1e022 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,71 @@ +kind: pipeline +type: kubernetes +name: build-arm64 +platform: + arch: arm64 + os: linux +node_selector: + kubernetes.io/arch: arm64 +tolerations: +- key: arch + operator: Equal + value: arm64 + effect: NoSchedule +steps: +- name: docker + image: plugins/docker + settings: + repo: harbor.k-space.ee/${DRONE_REPO} + tags: latest-arm64 + registry: harbor.k-space.ee + squash: true + experimental: true + mtu: 1300 + username: + from_secret: docker_username + password: + from_secret: docker_password +--- +kind: pipeline +type: kubernetes +name: build-amd64 +platform: + arch: amd64 + os: linux +node_selector: + kubernetes.io/arch: amd64 +steps: +- name: docker + image: plugins/docker + settings: + repo: harbor.k-space.ee/${DRONE_REPO} + tags: latest-amd64 + registry: harbor.k-space.ee + squash: true + experimental: true + mtu: 1300 + storage_driver: vfs + username: + from_secret: docker_username + password: + from_secret: docker_password +--- +kind: pipeline +type: kubernetes +name: manifest +steps: +- name: manifest + image: plugins/manifest + settings: + target: harbor.k-space.ee/${DRONE_REPO}:latest + template: harbor.k-space.ee/${DRONE_REPO}:latest-ARCH + platforms: + - linux/amd64 + - linux/arm64 + username: + from_secret: docker_username + password: + from_secret: docker_password +depends_on: +- build-amd64 +- build-arm64 diff --git a/plugin.sh b/plugin.sh index da2e845..de298b2 100755 --- a/plugin.sh +++ b/plugin.sh @@ -100,6 +100,7 @@ fi --context=${CONTEXT} \ --dockerfile=${DOCKERFILE} \ --force \ + --single-snapshot \ ${EXTRA_OPTS} \ ${DESTINATIONS} \ ${CACHE:-} \