Revert "[#699] Test alpine builds"

This reverts commit f3deca41d7.
This commit is contained in:
Rahul De 2021-01-03 15:57:30 +01:00
parent f3deca41d7
commit 2314c82a1a
No known key found for this signature in database
GPG key ID: 4435E700B66BA90F
2 changed files with 18 additions and 6 deletions

View file

@ -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" }}

View file

@ -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