Files
faas/ci/tagAndPush.sh
Richard Gee 27ebbfdccd Refactor CI and enable auto-builds for auth
Automatic builds for auth-module on x86_64 (via Travis) and on-demand on-device for arm via publish.sh

The basic-auth module is not built or pushed upon 'tag' / 'release' of the faas repo, but it should be: https://github.com/openfaas/faas/tree/master/auth.  We also don't create on-device images for this, but should do for both armhf and arm64: https://github.com/openfaas/faas/blob/master/contrib/publish-arm.sh

This change addresses these challenges and also introduces a tagAndPush script to alleviate some of the recently introduced repetition in .travis.yml.

Signed-off-by: Richard Gee <richard@technologee.co.uk>
2019-06-23 20:39:48 +01:00

18 lines
447 B
Bash
Executable File

#!/bin/sh
set -e
IMAGE_NAME=$1
PLATFORM=""
if [ ! -z "$2" ]; then
PLATFORM="-$2"
fi
echo "Tagging $IMAGE_NAME:$TRAVIS_TAG$PLATFORM"
docker tag $IMAGE_NAME:latest-dev$PLATFORM $IMAGE_NAME:$TRAVIS_TAG$PLATFORM;
docker tag $IMAGE_NAME:latest-dev$PLATFORM quay.io/$IMAGE_NAME:$TRAVIS_TAG$PLATFORM;
echo "Pushing $IMAGE_NAME:$TRAVIS_TAG$PLATFORM"
docker push $IMAGE_NAME:$TRAVIS_TAG$PLATFORM;
docker push quay.io/$IMAGE_NAME:$TRAVIS_TAG$PLATFORM;