From 833add99a0c1a8feb1cf0fda15ad54667a31644c Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 3 Feb 2019 07:00:50 +0100 Subject: [PATCH] Reverse build order, add manifest creation. --- .deploy/docker/manifest.sh | 34 ++++++++++++++++++++++++++++++++++ .travis.yml | 3 ++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100755 .deploy/docker/manifest.sh diff --git a/.deploy/docker/manifest.sh b/.deploy/docker/manifest.sh new file mode 100755 index 0000000000..7877508def --- /dev/null +++ b/.deploy/docker/manifest.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash +if [ "$TRAVIS_BRANCH" == "develop" ]; then + TARGET=jc5x/firefly-iii:develop + ARM=jc5x/firefly-iii:develop-arm + AMD=jc5x/firefly-iii:develop + + docker manifest create $TARGET $AMD $ARM + docker manifest annotate $TARGET $ARM --arch arm --os linux + docker manifest annotate $TARGET $AMD --arch amd64 --os linux + docker manifest push $TARGET +fi + +echo "The version is $VERSION" + +if [ "$TRAVIS_BRANCH" == "master" ]; then + TARGET=jc5x/firefly-iii:latest + ARM=jc5x/firefly-iii:latest-arm + AMD=jc5x/firefly-iii:latest + + docker manifest create $TARGET $AMD $ARM + docker manifest annotate $TARGET $ARM --arch arm --os linux + docker manifest annotate $TARGET $AMD --arch amd64 --os linux + docker manifest push $TARGET + + # and another one for version specific: + TARGET=jc5x/firefly-iii:release-$VERSION + ARM=jc5x/firefly-iii:release-$VERSION-arm + AMD=jc5x/firefly-iii:release-$VERSION + + docker manifest create $TARGET $AMD $ARM + docker manifest annotate $TARGET $ARM --arch arm --os linux + docker manifest annotate $TARGET $AMD --arch amd64 --os linux + docker manifest push $TARGET +fi diff --git a/.travis.yml b/.travis.yml index 0eee99e99b..ae31eb4043 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,5 +18,6 @@ script: - sudo service docker restart - docker version -f '{{.Server.Experimental}}' - docker version - - .deploy/docker/build-arm.sh - .deploy/docker/build-amd64.sh + - .deploy/docker/build-arm.sh + - .deploy/docker/manifest.sh \ No newline at end of file