Fix alpha builds + version builds.

This commit is contained in:
James Cole 2019-11-07 06:14:45 +01:00
parent 828b9d32aa
commit bb449e1940
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E

View File

@ -8,6 +8,7 @@ sudo service docker restart
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
VERSION_TARGET=jc5x/firefly-iii:release-$VERSION
# if the github branch is develop, only push the 'develop' tag
if [ $TRAVIS_BRANCH == "develop" ]; then
@ -42,6 +43,15 @@ if [ $TRAVIS_BRANCH == "master" ] && [ $CHANNEL == "alpha" ]; then
docker manifest annotate $TARGET $ARM64 --arch arm64 --os linux
docker manifest annotate $TARGET $AMD64 --arch amd64 --os linux
docker manifest push $TARGET
echo "Push alpha-* builds to $VERSION_TARGET"
docker manifest create $VERSION_TARGET $ARM32 $ARM64 $AMD64
docker manifest annotate $VERSION_TARGET $ARM32 --arch arm --os linux
docker manifest annotate $VERSION_TARGET $ARM64 --arch arm64 --os linux
docker manifest annotate $VERSION_TARGET $AMD64 --arch amd64 --os linux
docker manifest push $VERSION_TARGET
fi
# if branch is master and channel is alpha, push 'alpha' and 'beta'.
@ -73,6 +83,14 @@ if [ $TRAVIS_BRANCH == "master" ] && [ $CHANNEL == "beta" ]; then
docker manifest annotate $TARGET $ARM64 --arch arm64 --os linux
docker manifest annotate $TARGET $AMD64 --arch amd64 --os linux
docker manifest push $TARGET
echo "Push beta-* builds to $VERSION_TARGET"
docker manifest create $VERSION_TARGET $ARM32 $ARM64 $AMD64
docker manifest annotate $VERSION_TARGET $ARM32 --arch arm --os linux
docker manifest annotate $VERSION_TARGET $ARM64 --arch arm64 --os linux
docker manifest annotate $VERSION_TARGET $AMD64 --arch amd64 --os linux
docker manifest push $VERSION_TARGET
fi
# if branch is master and channel is stable, push 'alpha' and 'beta' and 'stable'.
@ -130,24 +148,14 @@ if [ $TRAVIS_BRANCH == "master" ] && [ $CHANNEL == "stable" ]; then
docker manifest annotate $TARGET $ARM64 --arch arm64 --os linux
docker manifest annotate $TARGET $AMD64 --arch amd64 --os linux
docker manifest push $TARGET
fi
# push to channel 'version' if master
if [ $TRAVIS_BRANCH == "master" ]; then
TARGET=jc5x/firefly-iii:release-$VERSION
ARM32=jc5x/firefly-iii:stable-arm
ARM64=jc5x/firefly-iii:stable-arm64
AMD64=jc5x/firefly-iii:stable-amd64
echo "Push stable-* builds to $VERSION_TARGET"
echo "GitHub branch is $TRAVIS_BRANCH."
echo "Channel is $CHANNEL."
echo "Push stable-* builds to $TARGET"
docker manifest create $TARGET $ARM32 $ARM64 $AMD64
docker manifest annotate $TARGET $ARM32 --arch arm --os linux
docker manifest annotate $TARGET $ARM64 --arch arm64 --os linux
docker manifest annotate $TARGET $AMD64 --arch amd64 --os linux
docker manifest push $TARGET
docker manifest create $VERSION_TARGET $ARM32 $ARM64 $AMD64
docker manifest annotate $VERSION_TARGET $ARM32 --arch arm --os linux
docker manifest annotate $VERSION_TARGET $ARM64 --arch arm64 --os linux
docker manifest annotate $VERSION_TARGET $AMD64 --arch amd64 --os linux
docker manifest push $VERSION_TARGET
fi
echo 'Done!'