From 2314c82a1a1fa49ea9b1419397d20091f68d08bf Mon Sep 17 00:00:00 2001 From: Rahul De Date: Sun, 3 Jan 2021 15:57:30 +0100 Subject: [PATCH] Revert "[#699] Test alpine builds" This reverts commit f3deca41d72b1c7943c07069b38d649ee09ef348. --- .circleci/config.yml | 8 ++++++++ .circleci/script/docker | 16 ++++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7cc5e1dd..4e45fab3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -160,6 +160,14 @@ jobs: command: | git submodule init git submodule update + - run: + name: "Short circuit on SNAPSHOT" + command: | + VERSION=$(cat resources/BABASHKA_VERSION) + if [[ "$VERSION" == *-SNAPSHOT ]] + then + circleci task halt + fi - restore_cache: keys: - linux-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }} diff --git a/.circleci/script/docker b/.circleci/script/docker index 424dda24..6291560e 100755 --- a/.circleci/script/docker +++ b/.circleci/script/docker @@ -21,20 +21,24 @@ if [ -z "$CIRCLE_PULL_REQUEST" ] && [ "$CIRCLE_BRANCH" = "master" ]; then docker build -t "$image_name" -f Dockerfile.ci . docker tag "$image_name:$latest_tag" "$image_name:$image_tag" rm -f bb - unzip "/tmp/release/babashka-${image_tag}-linux-static-amd64.zip" - docker build -t "$image_name:alpine" -f Dockerfile.alpine . - docker tag "$image_name:alpine" "$image_name:$image_tag-alpine" + if [[ $snapshot == "false" ]]; then + unzip "/tmp/release/babashka-${image_tag}-linux-static-amd64.zip" + docker build -t "$image_name:alpine" -f Dockerfile.alpine . + docker tag "$image_name:alpine" "$image_name:$image_tag-alpine" + fi # we only update latest when it's not a SNAPSHOT version if [ "false" = "$snapshot" ]; then echo "Pushing image $image_name:$latest_tag" docker push "$image_name:$latest_tag" + echo "Pushing image $image_name:alpine" + docker push "$image_name:alpine" fi - echo "Pushing image $image_name:alpine" - docker push "$image_name:alpine" # we update the version tag, even if it's a SNAPSHOT version echo "Pushing image $image_name:$image_tag" docker push "$image_name:$image_tag" - docker push "$image_name:$image_tag-alpine" + if [[ $snapshot == "false" ]]; then + docker push "$image_name:$image_tag-alpine" + fi else echo "Not publishing Docker image" fi