refactor vars and remove unused function

This commit is contained in:
darteaga 2020-07-02 12:06:41 +00:00
parent ff93bf6411
commit ec594cb887
1 changed files with 4 additions and 9 deletions

13
pushall
View File

@ -15,11 +15,6 @@ BASENAME=bitnami/minideb
GCR_BASENAME=gcr.io/bitnami-containers/minideb
QUAY_BASENAME=quay.io/bitnami/minideb
is_snapshot() {
local -r dist_snapshot_regex="^(jessie|stretch|buster|unstable)-snapshot"
[[ $1 =~ $dist_snapshot_regex ]]
}
if [ -n "${DOCKER_PASSWORD:-}" ]; then
docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
fi
@ -59,11 +54,11 @@ if [ -f "build/snapshot_id" ]; then
snapshot_id=$(cat build/snapshot_id)
for DIST in $DISTS_WITH_SNAPSHOT; do
DIST="${DIST}-snapshot-${snapshot_id}"
TAG="${DIST}-snapshot-${snapshot_id}"
docker tag "${BASENAME}:${DIST}" "${QUAY_BASENAME}:${DIST}"
docker tag "${BASENAME}:${DIST}" "${GCR_BASENAME}:${DIST}"
push "$DIST"
docker tag "${BASENAME}:${TAG}" "${QUAY_BASENAME}:${TAG}"
docker tag "${BASENAME}:${TAG}" "${GCR_BASENAME}:${TAG}"
push "${TAG}"
done
fi