From a0caea929276559c179cc8c0cbfe5daf465f5532 Mon Sep 17 00:00:00 2001 From: Eloy Coto Date: Wed, 26 Jul 2023 12:31:03 +0200 Subject: [PATCH] feat: release tag latest version with stable tag Backstage parodos is still under different version tracking, so not added here yet! Signed-off-by: Eloy Coto --- .github/workflows/release_append.yaml | 7 +++++++ Makefile | 1 + hack/scripts/stable_images.sh | 16 ++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100755 hack/scripts/stable_images.sh diff --git a/.github/workflows/release_append.yaml b/.github/workflows/release_append.yaml index a8ce62326..ab0fc63af 100644 --- a/.github/workflows/release_append.yaml +++ b/.github/workflows/release_append.yaml @@ -19,6 +19,13 @@ jobs: with: version: 'v1.27.0' + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + registry: "quay.io" + username: "parodos-dev+githubpush" + password: "${{ secrets.QUAY_GITHUB_TOKEN }}" + - name: Build run: | make release-manifests diff --git a/Makefile b/Makefile index 1efe52bf6..d1fc67574 100644 --- a/Makefile +++ b/Makefile @@ -196,6 +196,7 @@ release-all: update-version release git-release git-tag build-images tag-images release-manifests: ./hack/scripts/release.sh $(RELEASE_VERSION) + ./hack/scripts/stable_images.sh v$(RELEASE_VERSION) ##@ Run .PHONY: docker-run docker-stop diff --git a/hack/scripts/stable_images.sh b/hack/scripts/stable_images.sh new file mode 100755 index 000000000..a8333f2d6 --- /dev/null +++ b/hack/scripts/stable_images.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# +export VERSION=${1:-1.0} + +echo "Pushing stable images for ${VERSION}"; +SERVICES=("workflow-service" "notification-service") + + +for service in "${SERVICES[@]}"; do + source_image="quay.io/parodos-dev/${service}:${VERSION}" + target_image="quay.io/parodos-dev/${service}:stable" + + docker pull "${source_image}" + docker tag "${source_image}" "${target_image}" + docker push "${target_image}" +done