Files
firefly-iii/.deploy/docker/build-generic.sh

28 lines
952 B
Bash
Raw Normal View History

2019-02-08 17:15:54 +01:00
#!/usr/bin/env bash
# build image
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
2019-02-08 17:40:29 +01:00
# get qemu-arm-static binary
2019-02-09 06:40:55 +01:00
if [ "$TRAVIS_BRANCH" == "arm" ]; then
2019-02-08 17:40:29 +01:00
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 && \
tar xzf qemu-arm-static.tar.gz && \
popd
fi
2019-02-08 17:15:54 +01:00
# build develop
if [ "$TRAVIS_BRANCH" == "develop" ]; then
echo "Build develop $ARCH"
2019-02-09 06:40:55 +01:00
docker build -t jc5x/firefly-iii:develop-$ARCH -f Dockerfile.$ARCH .
docker push jc5x/firefly-iii:develop-$ARCH
2019-02-08 17:15:54 +01:00
fi
2019-02-09 06:40:55 +01:00
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