From f015495038f16463dc4eabbe096ec296ba083f33 Mon Sep 17 00:00:00 2001 From: Peter Varsanyi Date: Sat, 9 Jun 2018 20:22:02 -0700 Subject: [PATCH 01/10] add multiarch travis build --- .travis.yml | 22 ++++++++++++++++++++++ Dockerfile.amd64 | 1 + Dockerfile.arm64 | 21 +++++++++++++++++++++ Dockerfile.armhf | 21 +++++++++++++++++++++ README.md | 3 +++ 5 files changed, 68 insertions(+) create mode 100644 .travis.yml create mode 120000 Dockerfile.amd64 create mode 100644 Dockerfile.arm64 create mode 100644 Dockerfile.armhf diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..e9945a745 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,22 @@ +language: bash +sudo: required +services: docker +env: + global: + - REPO=gwelican/bazarr + - QEMU_VERSION=v2.11.0 + - COMMIT=${TRAVIS_COMMIT::8} + - secure: p29iUgrD8tRnoWu1ZG9OpunG4/tydnnvyodDFNEMrqpY+4iO05p3LJBQfhi5OrkNMiJNLgeMB9nrLH0hJVKbiqRsaS0qMeeZwnFtU7AyoNmCbUhCKwz2xZB4djy2mt0tehTFNMzDwSX/w4YwaM60b3Dl2s2J96x7ovz/Mg6VWb195JD3WC6ags1+vmcAqOyzo+++GASJ8p/EO7MYiwkvUyXWW+RStaM+v8Pf7HN5xk+lKEaGvuL4PaxA74pRrg8roEcbOmhUcFE56PHstej3IieUUInumIbUm7ct577luPhnAfelm/xQwSFCArZCt0c7wJB284cY3FxeaRZHy7PnjyMatV/gtoea02ov0Wc3fq3KbpsGQbnr+SbkszMAfFOFSI2OVzqm51d3uNX5+KQu8hmyA2AUB+Nq09GObdMngXEIa3EsW2WtOWhYs0WKSvhmicglR10CtMP30v5T9kppcysl1cw8mc8OwJnxaeoSqreIMNMaIMc3EBG6XQMZVXkHZSELAJsf35o6Ny06rH0JtpAgDGgFZB2eUkOeu18NNIjiIV3bAF3SPKl+3o6P6OT9AQmgLTq6IsIA3UUGC6cBQMWnArjy+ZVeLZzhvDA/50x+QmOqay0XGG12xJIzYAGalJ/HpBYRcSuSQymqvzrv99CyGfDjQ4pXi5hNtzKxHZ8= + - secure: n4xpzgWGDdr8SSGh7R6ffoAcxywK2juhKrxftCxpaBTNIVV2lRIsaUW2fMUkbi4ohEpA8QRg6OHBYfWH/LiWG2o7jjixQFV3aPdbIqS8mI6hxBz7abxYSYmg4qbdCX7+4o/73G8HdA5W1lFLp6qvFOasjb181qvyQwpCBxvxjg5BAeOPP0+Fr4swso/JnrkqVtaacNmstMTnNhNe34nbs3yh+nOhXxQyrdKQeq+9SCTsMglDK9JL/G9in7QYsAwfGxjzwy1k93Y1eVGiLb10ik2MJStzKUvC3OBzE+7p5sScdieJuXC1/zRxgU8eSecN8ryDVVOWdIF9SjZupZOe6QdMrrSf4noQbJeqKcdTHzkKXtd3C3VV8a9evTzp2lEqxrqJ6nLMNKtry3JtB6O6kIXeXBk/c6rmG8/7ZtGzYwS97g4EV4owfcINA5LmAPyqTGeNxo5ZxhlM6fonRw8kZtPH+JY3/cxzoM3Y5jcWUlLOPf/TvHCvyFCcNW0QtIfBc+LIl9ZMk2oXANM99t6AUNSYUABSV9ZQj1xp/8FhLF9qWumt4m0ty5hm976GonngLyzh3Tfr3lTb2bODSvcaNkkzL9mk8+lEkWnIfIO6OLrh+varsUUYDWY6PLgjICetQEoN+RiaCFITms4NuwURqYMY8vDTe5JkbBL+MvQT+sM= + matrix: + - ARCH=amd64 + - QEMU_ARCH=arm ARCH=armhf + - QEMU_ARCH=aarch64 ARCH=arm64 +script: +- docker run --rm --privileged multiarch/qemu-user-static:register +- docker build -t $REPO:$COMMIT -f Dockerfile.$ARCH . +after_success: +- docker login -u $DOCKER_USER -p $DOCKER_PASS +- if [ "$ARCH" == "amd64" ]; then docker tag $REPO:$COMMIT $REPO:latest; fi +- docker tag $REPO:$COMMIT $REPO:$ARCH-latest +- docker push $REPO diff --git a/Dockerfile.amd64 b/Dockerfile.amd64 new file mode 120000 index 000000000..1d1fe94df --- /dev/null +++ b/Dockerfile.amd64 @@ -0,0 +1 @@ +Dockerfile \ No newline at end of file diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 new file mode 100644 index 000000000..ed0dd6b5c --- /dev/null +++ b/Dockerfile.arm64 @@ -0,0 +1,21 @@ +FROM lsiobase/alpine.python:3.7 + +# set python to use utf-8 rather than ascii. +ENV PYTHONIOENCODING="UTF-8" +ENV QEMU_VERSION v2.11.0 + +ADD https://github.com/multiarch/qemu-user-static/releases/download/${QEMU_VERSION}/qemu-arm-static /usr/bin + +VOLUME /tv + +RUN apk add --update git py-pip jpeg-dev && \ + apk add --update --virtual build-dependencies build-base python-dev libffi-dev zlib-dev && \ + git clone https://github.com/morpheus65535/bazarr.git /bazarr && \ + pip install -r /bazarr/requirements.txt && \ + apk del --purge build-dependencies + +VOLUME /bazarr/data + +EXPOSE 6767 + +CMD ["python", "/bazarr/bazarr.py"] diff --git a/Dockerfile.armhf b/Dockerfile.armhf new file mode 100644 index 000000000..ed0dd6b5c --- /dev/null +++ b/Dockerfile.armhf @@ -0,0 +1,21 @@ +FROM lsiobase/alpine.python:3.7 + +# set python to use utf-8 rather than ascii. +ENV PYTHONIOENCODING="UTF-8" +ENV QEMU_VERSION v2.11.0 + +ADD https://github.com/multiarch/qemu-user-static/releases/download/${QEMU_VERSION}/qemu-arm-static /usr/bin + +VOLUME /tv + +RUN apk add --update git py-pip jpeg-dev && \ + apk add --update --virtual build-dependencies build-base python-dev libffi-dev zlib-dev && \ + git clone https://github.com/morpheus65535/bazarr.git /bazarr && \ + pip install -r /bazarr/requirements.txt && \ + apk del --purge build-dependencies + +VOLUME /bazarr/data + +EXPOSE 6767 + +CMD ["python", "/bazarr/bazarr.py"] diff --git a/README.md b/README.md index d3d19b57a..a39799e30 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ # bazarr Bazarr is a companion application to Sonarr. It manage and download subtitles based on your requirements. You defined your preferences by TV show and Bazarr take care of everything for you. +# Build status +![Build status](https://travis-ci.org/morpheus65535/bazarr.svg?branch=master) + # Support For installation and configuration instructions, see [wiki](https://github.com/morpheus65535/bazarr/wiki). From 252e26dd43e8e6113bf0febf11ac3a58b6ead400 Mon Sep 17 00:00:00 2001 From: Peter Varsanyi Date: Sat, 9 Jun 2018 20:30:48 -0700 Subject: [PATCH 02/10] remove commit tag --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index e9945a745..1d8e3731a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,9 +14,8 @@ env: - QEMU_ARCH=aarch64 ARCH=arm64 script: - docker run --rm --privileged multiarch/qemu-user-static:register -- docker build -t $REPO:$COMMIT -f Dockerfile.$ARCH . +- docker build -t $REPO:$ARCH-latest -f Dockerfile.$ARCH . after_success: - docker login -u $DOCKER_USER -p $DOCKER_PASS - if [ "$ARCH" == "amd64" ]; then docker tag $REPO:$COMMIT $REPO:latest; fi -- docker tag $REPO:$COMMIT $REPO:$ARCH-latest - docker push $REPO From bd1ef7bee884a7bee2a93c53daffe2a6edc8027a Mon Sep 17 00:00:00 2001 From: Peter Varsanyi Date: Sat, 9 Jun 2018 20:34:02 -0700 Subject: [PATCH 03/10] disable pull request push in script --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1d8e3731a..8cca9bb86 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,4 +18,4 @@ script: after_success: - docker login -u $DOCKER_USER -p $DOCKER_PASS - if [ "$ARCH" == "amd64" ]; then docker tag $REPO:$COMMIT $REPO:latest; fi -- docker push $REPO +- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then docker push $REPO; fi From 9fc20458aabba6b72d45dcbd0e5cfa589f25cebd Mon Sep 17 00:00:00 2001 From: Peter Varsanyi Date: Sat, 9 Jun 2018 20:40:30 -0700 Subject: [PATCH 04/10] add commit arch tag back --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8cca9bb86..8bc601686 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,8 +14,9 @@ env: - QEMU_ARCH=aarch64 ARCH=arm64 script: - docker run --rm --privileged multiarch/qemu-user-static:register -- docker build -t $REPO:$ARCH-latest -f Dockerfile.$ARCH . +- docker build -t $REPO:$ARCH-$COMMIT -f Dockerfile.$ARCH . after_success: - docker login -u $DOCKER_USER -p $DOCKER_PASS - if [ "$ARCH" == "amd64" ]; then docker tag $REPO:$COMMIT $REPO:latest; fi +- docker tag $REPO:$ARCH-$COMMIT $REPO:$ARCH-latest - if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then docker push $REPO; fi From 65f3cf37eeac8017e630f647b87a9de4b77e8311 Mon Sep 17 00:00:00 2001 From: Peter Varsanyi Date: Sat, 9 Jun 2018 20:43:07 -0700 Subject: [PATCH 05/10] reverse arch and commit for easier tracking --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8bc601686..e3e442a1e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,9 +14,9 @@ env: - QEMU_ARCH=aarch64 ARCH=arm64 script: - docker run --rm --privileged multiarch/qemu-user-static:register -- docker build -t $REPO:$ARCH-$COMMIT -f Dockerfile.$ARCH . +- docker build -t $REPO:$COMMIT-$ARCH -f Dockerfile.$ARCH . after_success: - docker login -u $DOCKER_USER -p $DOCKER_PASS - if [ "$ARCH" == "amd64" ]; then docker tag $REPO:$COMMIT $REPO:latest; fi -- docker tag $REPO:$ARCH-$COMMIT $REPO:$ARCH-latest +- docker tag $REPO:$COMMIT-$ARCH $REPO:$ARCH-latest - if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then docker push $REPO; fi From 009643cf73966ab90f31c7d4ac7b8d23d45f2ccf Mon Sep 17 00:00:00 2001 From: Peter Varsanyi Date: Sun, 10 Jun 2018 19:09:59 -0700 Subject: [PATCH 06/10] update docker files --- Dockerfile.arm64 | 2 +- Dockerfile.armhf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 index ed0dd6b5c..b721761f7 100644 --- a/Dockerfile.arm64 +++ b/Dockerfile.arm64 @@ -1,4 +1,4 @@ -FROM lsiobase/alpine.python:3.7 +FROM lsiobase/alpine.python.arm64:3.7 # set python to use utf-8 rather than ascii. ENV PYTHONIOENCODING="UTF-8" diff --git a/Dockerfile.armhf b/Dockerfile.armhf index ed0dd6b5c..6cc8b66f2 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -1,4 +1,4 @@ -FROM lsiobase/alpine.python:3.7 +FROM lsiobase/alpine.python.armhf:3.7 # set python to use utf-8 rather than ascii. ENV PYTHONIOENCODING="UTF-8" From 4e7cc2e1170c1263c7cd16824f5a8afcbbb47ea2 Mon Sep 17 00:00:00 2001 From: Peter Varsanyi Date: Sun, 10 Jun 2018 19:33:50 -0700 Subject: [PATCH 07/10] try different approach --- .travis.yml | 1 + Dockerfile.arm64 | 2 +- Dockerfile.armhf | 3 +-- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index e3e442a1e..0ea8b3785 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,7 @@ env: - QEMU_ARCH=arm ARCH=armhf - QEMU_ARCH=aarch64 ARCH=arm64 script: +- if [ "$ARCH" != "amd64" ]; then curl -L -o qemu-$ARCH-static https://github.com/multiarch/qemu-user-static/releases/download/${QEMU_VERSION}/qemu-$QEMU_ARCH-static; chmod u+x qemu-$QEMU_ARCH-static; fi - docker run --rm --privileged multiarch/qemu-user-static:register - docker build -t $REPO:$COMMIT-$ARCH -f Dockerfile.$ARCH . after_success: diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 index b721761f7..a1ce39cb6 100644 --- a/Dockerfile.arm64 +++ b/Dockerfile.arm64 @@ -4,7 +4,7 @@ FROM lsiobase/alpine.python.arm64:3.7 ENV PYTHONIOENCODING="UTF-8" ENV QEMU_VERSION v2.11.0 -ADD https://github.com/multiarch/qemu-user-static/releases/download/${QEMU_VERSION}/qemu-arm-static /usr/bin +ADD qemu-aarch64-static /usr/bin VOLUME /tv diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 6cc8b66f2..8aa5bc016 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -2,9 +2,8 @@ FROM lsiobase/alpine.python.armhf:3.7 # set python to use utf-8 rather than ascii. ENV PYTHONIOENCODING="UTF-8" -ENV QEMU_VERSION v2.11.0 -ADD https://github.com/multiarch/qemu-user-static/releases/download/${QEMU_VERSION}/qemu-arm-static /usr/bin +ADD qemu-arm-static /usr/bin VOLUME /tv From 6f5a479e534c8b1fa3fee40616cc0354f2606ac7 Mon Sep 17 00:00:00 2001 From: Peter Varsanyi Date: Sun, 10 Jun 2018 19:36:14 -0700 Subject: [PATCH 08/10] fix arch variable --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0ea8b3785..d7c006deb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ env: - QEMU_ARCH=arm ARCH=armhf - QEMU_ARCH=aarch64 ARCH=arm64 script: -- if [ "$ARCH" != "amd64" ]; then curl -L -o qemu-$ARCH-static https://github.com/multiarch/qemu-user-static/releases/download/${QEMU_VERSION}/qemu-$QEMU_ARCH-static; chmod u+x qemu-$QEMU_ARCH-static; fi +- if [ "$ARCH" != "amd64" ]; then curl -L -o qemu-$QEMU_ARCH-static https://github.com/multiarch/qemu-user-static/releases/download/${QEMU_VERSION}/qemu-$QEMU_ARCH-static; chmod u+x qemu-$QEMU_ARCH-static; fi - docker run --rm --privileged multiarch/qemu-user-static:register - docker build -t $REPO:$COMMIT-$ARCH -f Dockerfile.$ARCH . after_success: From e712b82d61b4d1adcf75aaf9bf934d970aaf66b1 Mon Sep 17 00:00:00 2001 From: Peter Varsanyi Date: Sun, 10 Jun 2018 19:44:50 -0700 Subject: [PATCH 09/10] remove qemu version from dockerfile --- Dockerfile.arm64 | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 index a1ce39cb6..d13c66760 100644 --- a/Dockerfile.arm64 +++ b/Dockerfile.arm64 @@ -2,7 +2,6 @@ FROM lsiobase/alpine.python.arm64:3.7 # set python to use utf-8 rather than ascii. ENV PYTHONIOENCODING="UTF-8" -ENV QEMU_VERSION v2.11.0 ADD qemu-aarch64-static /usr/bin From aaf933d89af8385548b65ff23f6e4fb11b3701bc Mon Sep 17 00:00:00 2001 From: Peter Varsanyi Date: Sun, 10 Jun 2018 19:59:21 -0700 Subject: [PATCH 10/10] update docker hub repo --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d7c006deb..4651d8cc9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ sudo: required services: docker env: global: - - REPO=gwelican/bazarr + - REPO=morpheus65535/bazarr - QEMU_VERSION=v2.11.0 - COMMIT=${TRAVIS_COMMIT::8} - secure: p29iUgrD8tRnoWu1ZG9OpunG4/tydnnvyodDFNEMrqpY+4iO05p3LJBQfhi5OrkNMiJNLgeMB9nrLH0hJVKbiqRsaS0qMeeZwnFtU7AyoNmCbUhCKwz2xZB4djy2mt0tehTFNMzDwSX/w4YwaM60b3Dl2s2J96x7ovz/Mg6VWb195JD3WC6ags1+vmcAqOyzo+++GASJ8p/EO7MYiwkvUyXWW+RStaM+v8Pf7HN5xk+lKEaGvuL4PaxA74pRrg8roEcbOmhUcFE56PHstej3IieUUInumIbUm7ct577luPhnAfelm/xQwSFCArZCt0c7wJB284cY3FxeaRZHy7PnjyMatV/gtoea02ov0Wc3fq3KbpsGQbnr+SbkszMAfFOFSI2OVzqm51d3uNX5+KQu8hmyA2AUB+Nq09GObdMngXEIa3EsW2WtOWhYs0WKSvhmicglR10CtMP30v5T9kppcysl1cw8mc8OwJnxaeoSqreIMNMaIMc3EBG6XQMZVXkHZSELAJsf35o6Ny06rH0JtpAgDGgFZB2eUkOeu18NNIjiIV3bAF3SPKl+3o6P6OT9AQmgLTq6IsIA3UUGC6cBQMWnArjy+ZVeLZzhvDA/50x+QmOqay0XGG12xJIzYAGalJ/HpBYRcSuSQymqvzrv99CyGfDjQ4pXi5hNtzKxHZ8=