mirror of
https://github.com/bitnami/minideb.git
synced 2026-06-04 10:13:55 +08:00
7df2db746c
gcloud became more strict about separating gcloud arguments from docker arguments, and is now throwing an error failing the build https://travis-ci.org/bitnami/minideb/jobs/246281633#L5140 Use `--` to separate the arguments.
34 lines
658 B
Bash
Executable File
34 lines
658 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
set -u
|
|
set -o pipefail
|
|
|
|
DISTS="jessie
|
|
stretch
|
|
unstable
|
|
latest
|
|
"
|
|
|
|
BASENAME=bitnami/minideb
|
|
GCR_BASENAME=gcr.io/bitnami-containers/minideb
|
|
QUAY_BASENAME=quay.io/bitnami/minideb
|
|
|
|
if [ -n "${DOCKER_PASSWORD:-}" ]; then
|
|
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
|
|
fi
|
|
|
|
if [ -n "${QUAY_PASSWORD:-}" ]; then
|
|
docker login -u $QUAY_USERNAME -p $QUAY_PASSWORD quay.io
|
|
fi
|
|
|
|
if [ -n "${GCR_KEY:-}" ]; then
|
|
gcloud auth activate-service-account $GCR_EMAIL --key-file <(echo "$GCR_KEY")
|
|
fi
|
|
|
|
for DIST in $DISTS; do
|
|
docker push $BASENAME:$DIST
|
|
docker push $QUAY_BASENAME:$DIST
|
|
gcloud docker -- push $GCR_BASENAME:$DIST
|
|
done
|