From cc95ce8c62607d12225fcaa7d7f7452254ebb147 Mon Sep 17 00:00:00 2001 From: Hussein Galal Date: Mon, 13 Jul 2020 22:51:51 +0200 Subject: [PATCH] use make for manifest (#82) --- .drone.yml | 18 ++++++++++-------- Makefile | 5 +++++ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.drone.yml b/.drone.yml index 20361d71ce..1b475b3678 100644 --- a/.drone.yml +++ b/.drone.yml @@ -95,16 +95,18 @@ platform: steps: - name: manifest - image: plugins/manifest:1.0.2 - settings: - username: + image: ranchertest/build-base:v1.14.2 + volumes: + - name: docker + path: /var/run/docker.sock + environment: + DOCKER_USERNAME: from_secret: docker_username - password: + DOCKER_PASSWORD: from_secret: docker_password - platforms: - - linux/amd64 - target: "rancher/rke2-runtime:${DRONE_TAG}" - template: "rancher/rke2-runtime:${DRONE_TAG}-ARCH" + commands: + - docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD + - DRONE_TAG=${DRONE_TAG} make image-manifest when: instance: - drone-publish.rancher.io diff --git a/Makefile b/Makefile index dad79fe96d..e161920213 100644 --- a/Makefile +++ b/Makefile @@ -182,5 +182,10 @@ k8s-image-scan: k8s-image-publish: k8s-image docker push ranchertest/kubernetes:${VERSION}-${GOARCH} +# currently works only with amd64 +image-manifest: + DOCKER_CLI_EXPERIMENTAL=enabled docker manifest create --amend ${REPO}/rke2-runtime:${VERSION} ${REPO}/rke2-runtime:${VERSION}-${GOARCH} + DOCKER_CLI_EXPERIMENTAL=enabled docker manifest push ${REPO}/rke2-runtime:${VERSION} + help: ## this help @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)