From 3488ed04e389d6f5c213ef137580b5a566a8d87a Mon Sep 17 00:00:00 2001 From: Sebastiaan van Steenis Date: Fri, 4 Aug 2023 11:47:20 +0200 Subject: [PATCH] Push existing image instead of building again --- .drone.yml | 22 ++++++++++++---------- scripts/package | 6 +++--- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.drone.yml b/.drone.yml index 5f7e38c..6bdeab3 100644 --- a/.drone.yml +++ b/.drone.yml @@ -102,17 +102,19 @@ steps: - tag - name: docker-publish - image: plugins/docker - settings: - dockerfile: package/Dockerfile - password: - from_secret: docker_password - repo: "rancher/rancher-cleanup" - tags: - - "${DRONE_TAG}-amd64" - - "latest-amd64" - username: + image: rancher/dapper:v0.6.0 + volumes: + - name: docker + path: /var/run/docker.sock + commands: + - docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD + - docker push docker.io/rancher/rancher-cleanup:$DRONE_TAG-amd64 + - docker push docker.io/rancher/rancher-cleanup:latest-amd64 + environment: + DOCKER_USERNAME: from_secret: docker_username + DOCKER_PASSWORD: + from_secret: docker_password when: instance: - drone-publish.rancher.io diff --git a/scripts/package b/scripts/package index 8aa552a..c011982 100755 --- a/scripts/package +++ b/scripts/package @@ -5,12 +5,12 @@ source $(dirname $0)/version cd $(dirname $0)/.. -mkdir -p dist/artifacts -cp ./cleanup.sh ./verify.sh dist/artifacts/ - sed -i -e 's/unreleased/'"$VERSION"'/' cleanup.sh sed -i -e 's/unreleased/'"$VERSION"'/' verify.sh +mkdir -p dist/artifacts +cp ./cleanup.sh ./verify.sh dist/artifacts/ + IMAGE=${REPO}/rancher-cleanup:${TAG} DOCKERFILE=package/Dockerfile if [ -e ${DOCKERFILE}.${ARCH} ]; then