diff --git a/.deploy/docker/build-generic.sh b/.deploy/docker/build-generic.sh index 83cd672e2c..ede14570c8 100755 --- a/.deploy/docker/build-generic.sh +++ b/.deploy/docker/build-generic.sh @@ -4,7 +4,7 @@ echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin # get qemu-arm-static binary -if [ "$TRAVIS_BRANCH" != "amd64" ]; then +if [ "$TRAVIS_BRANCH" == "arm" ]; then mkdir tmp pushd tmp && \ curl -L -o qemu-arm-static.tar.gz https://github.com/multiarch/qemu-user-static/releases/download/v2.6.0/qemu-arm-static.tar.gz && \ @@ -15,15 +15,14 @@ fi # build develop if [ "$TRAVIS_BRANCH" == "develop" ]; then echo "Build develop $ARCH" - # > original command. docker build -t whoami --build-arg "arch=$ARCH" . - docker build -t jc5x/firefly-iii:develop-$ARCH -f Dockerfile.$ARCH --build-arg "arch=$ARCH" . - #docker push jc5x/firefly-iii:develop + docker build -t jc5x/firefly-iii:develop-$ARCH -f Dockerfile.$ARCH . + docker push jc5x/firefly-iii:develop-$ARCH fi -#if [ "$TRAVIS_BRANCH" == "master" ]; then -# echo "Build master amd64" -# docker build -t jc5x/firefly-iii:latest-amd -f Dockerfile . -# docker tag jc5x/firefly-iii:latest-amd jc5x/firefly-iii:release-$VERSION-amd -# docker push jc5x/firefly-iii:latest-amd -# docker push jc5x/firefly-iii:release-$VERSION-amd -#fi \ No newline at end of file +if [ "$TRAVIS_BRANCH" == "master" ]; then + echo "Build master $ARCH" + docker build -t jc5x/firefly-iii:latest-$ARCH -f Dockerfile.$ARCH . + docker tag jc5x/firefly-iii:latest-$ARCH jc5x/firefly-iii:release-$VERSION-$ARCH + docker push jc5x/firefly-iii:latest-$ARCH + docker push jc5x/firefly-iii:release-$VERSION-$ARCH +fi \ No newline at end of file diff --git a/.deploy/docker/entrypoint.sh b/.deploy/docker/entrypoint.sh index 326d932e26..f5978beb77 100755 --- a/.deploy/docker/entrypoint.sh +++ b/.deploy/docker/entrypoint.sh @@ -2,6 +2,8 @@ echo "Now in entrypoint.sh for Firefly III" +lscpu + # make sure the correct directories exists (suggested by @chrif): echo "Making directories..." mkdir -p $FIREFLY_PATH/storage/app/public diff --git a/.deploy/docker/manifest.sh b/.deploy/docker/manifest.sh index 7e7d9b0abb..f67bf4792f 100755 --- a/.deploy/docker/manifest.sh +++ b/.deploy/docker/manifest.sh @@ -1,12 +1,9 @@ #!/usr/bin/env bash -# Disabled until I can figure out how this works in Travis. -exit 0 - if [ "$TRAVIS_BRANCH" == "develop" ]; then TARGET=jc5x/firefly-iii:develop ARM=jc5x/firefly-iii:develop-arm - AMD=jc5x/firefly-iii:develop-amd + AMD=jc5x/firefly-iii:develop-amd64 docker manifest create $TARGET $AMD $ARM docker manifest annotate $TARGET $ARM --arch arm --os linux @@ -19,7 +16,7 @@ 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-amd + AMD=jc5x/firefly-iii:latest-amd64 docker manifest create $TARGET $AMD $ARM docker manifest annotate $TARGET $ARM --arch arm --os linux @@ -29,7 +26,7 @@ if [ "$TRAVIS_BRANCH" == "master" ]; then # 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-amd + AMD=jc5x/firefly-iii:release-$VERSION-amd64 docker manifest create $TARGET $AMD $ARM docker manifest annotate $TARGET $ARM --arch arm --os linux diff --git a/.travis.yml b/.travis.yml index edc0dea906..6444c709df 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,10 @@ sudo: required env: + global: + - VERSION=4.7.11 matrix: - ARCH=arm - - ARCH=arm64 + #- ARCH=arm64 - ARCH=amd64 dist: xenial diff --git a/Dockerfile.amd64 b/Dockerfile.amd64 index c056613149..4b27c86669 100644 --- a/Dockerfile.amd64 +++ b/Dockerfile.amd64 @@ -1,5 +1,5 @@ FROM php:7.2-apache - +ARG ARCH ENV FIREFLY_PATH=/var/www/firefly-iii COMPOSER_ALLOW_SUPERUSER=1 LABEL version="1.3" maintainer="thegrumpydictator@gmail.com" diff --git a/Dockerfile.arm b/Dockerfile.arm index cfe6e0ad31..3860b358af 100644 --- a/Dockerfile.arm +++ b/Dockerfile.arm @@ -1,5 +1,5 @@ FROM arm32v7/php:7.2.8-apache-stretch -ARG TARGETPLATFORM +ARG ARCH COPY tmp/qemu-arm-static /usr/bin/qemu-arm-static ENV FIREFLY_PATH=/var/www/firefly-iii COMPOSER_ALLOW_SUPERUSER=1 LABEL version="1.3" maintainer="thegrumpydictator@gmail.com" diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 index cfe6e0ad31..3860b358af 100644 --- a/Dockerfile.arm64 +++ b/Dockerfile.arm64 @@ -1,5 +1,5 @@ FROM arm32v7/php:7.2.8-apache-stretch -ARG TARGETPLATFORM +ARG ARCH COPY tmp/qemu-arm-static /usr/bin/qemu-arm-static ENV FIREFLY_PATH=/var/www/firefly-iii COMPOSER_ALLOW_SUPERUSER=1 LABEL version="1.3" maintainer="thegrumpydictator@gmail.com"