Also push images to GCR.

We want to make our images available on GCR as well as dockerhub.

It is using our test account for now while testing Travis integration.
This commit is contained in:
James Westby 2016-10-12 13:44:18 +01:00
parent 44a24cda66
commit a915cb330e
2 changed files with 15 additions and 0 deletions

View File

@ -10,6 +10,7 @@ wheezy
LATEST=jessie
BASENAME=jamesw/minideb
GCR_BASENAME=gcr.io/bitnamigcetest2/minideb
mkdir -p build
@ -25,5 +26,7 @@ for DIST in $DISTS; do
echo "============================================"
./test $IMPORTED
docker tag $IMPORTED $BASENAME:$DIST
docker tag $IMPORTED $GCR_BASENAME:$DIST
done
docker tag $BASENAME:$LATEST $BASENAME:latest
docker tag $GCR_BASENAME:$LATEST $GCR_BASENAME:latest

12
pushall
View File

@ -9,6 +9,7 @@ wheezy
"
BASENAME=jamesw/minideb
GCR_BASENAME=gcr.io/bitnamigcetest2/minideb
if [ -n "$DOCKER_PASSWORD" ]; then
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
@ -18,3 +19,14 @@ for DIST in $DISTS; do
docker push $BASENAME:$DIST
done
docker push $BASENAME:latest
if [ -n "$GCR_KEY" ]; then
echo "$GCR_KEY" > keyfile.json
gcloud auth activate-service-account $GCR_EMAIL --key-file keyfile.json
fi
for DIST in $DISTS; do
gcloud docker push $GCR_BASENAME:$DIST
done
gcloud docker push $GCR_BASENAME:latest