From d5b0a38d97f48c73d4b1fa47f15361b2e072a1da Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Sat, 21 Sep 2019 18:57:20 +0200 Subject: [PATCH] Migration to Travis and Quay.io --- .travis.yml | 17 +++++++++++++++++ Makefile | 26 +++++++++++++++++++------- README.md | 13 +++++++++++++ armhf.Dockerfile => arm.Dockerfile | 0 Dockerfile => x86_64.Dockerfile | 0 5 files changed, 49 insertions(+), 7 deletions(-) create mode 100644 .travis.yml rename armhf.Dockerfile => arm.Dockerfile (100%) rename Dockerfile => x86_64.Dockerfile (100%) diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..8cceba7 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,17 @@ +language: python +if: branch = master OR tag IS present +python: 3.6 +services: + - docker + +before_script: + - echo "$DOCKER_PASSWORD" | sudo docker login -u "$DOCKER_USERNAME" --password-stdin + - echo "$QUAY_PASSWORD" | sudo docker login -u "$QUAY_USERNAME" --password-stdin quay.io + +jobs: + include: + - stage: Build recent x86_64 image + script: make build ARCH=x86_64 GIT_TAG=${TRAVIS_TAG} PUSH=true + + - stage: Build recent ARM image + script: make build ARCH=arm GIT_TAG=${TRAVIS_TAG} PUSH=true diff --git a/Makefile b/Makefile index 4cab999..3debbe1 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,21 @@ -SUDO=sudo - -all: build build_arm -build: - ${SUDO} docker build . -t wolnosciowiec/reverse-networking +.SILENT: +PUSH=true +SUDO=sudo +SHELL=/bin/bash +QUAY_REPO=quay.io/riotkit/reverse-networking -build_arm: - ${SUDO} docker build -f ./armhf.Dockerfile . -t wolnosciowiec/reverse-networking:armhf +build: ## Build and push (args: PUSH, ARCH, GIT_TAG) + set -e; DOCKER_TAG="latest-dev-${ARCH}"; \ + \ + if [[ "${GIT_TAG}" != '' ]]; then \ + DOCKER_TAG=${GIT_TAG}-${ARCH}; \ + fi; \ + \ + ${SUDO} docker build . -f ./${ARCH}.Dockerfile -t ${QUAY_REPO}:$${DOCKER_TAG}; \ + ${SUDO} docker tag ${QUAY_REPO}:$${DOCKER_TAG} ${QUAY_REPO}:$${DOCKER_TAG}-$$(date '+%Y-%m-%d'); \ + \ + if [[ "${PUSH}" == "true" ]]; then \ + ${SUDO} docker push ${QUAY_REPO}:$${DOCKER_TAG}-$$(date '+%Y-%m-%d'); \ + ${SUDO} docker push ${QUAY_REPO}:$${DOCKER_TAG}; \ + fi diff --git a/README.md b/README.md index 1498f3e..a8b9463 100644 --- a/README.md +++ b/README.md @@ -144,3 +144,16 @@ Examples: - PN_VALIDATE_COMMAND="/bin/false" # for testing - PN_VALIDATE_COMMAND="curl http://your-domain.org:8002" - PN_VALIDATE_COMMAND="wget -O - -T 2 http://172.28.0.6:3307 2>&1|grep mariadb" + +Copyleft +-------- + +Created by **RiotKit Collective**, a libertarian, grassroot, non-profit organization providing technical support for the non-profit Anarchist movement. + +Check out those initiatives: +- International Workers Association (https://iwa-ait.org) +- Federacja Anarchistyczna (http://federacja-anarchistyczna.pl) +- Związek Syndykalistów Polski (https://zsp.net.pl) (Polish section of IWA-AIT) +- Komitet Obrony Praw Lokatorów (https://lokatorzy.info.pl) +- Solidarity Federation (https://solfed.org.uk) +- Priama Akcia (https://priamaakcia.sk) diff --git a/armhf.Dockerfile b/arm.Dockerfile similarity index 100% rename from armhf.Dockerfile rename to arm.Dockerfile diff --git a/Dockerfile b/x86_64.Dockerfile similarity index 100% rename from Dockerfile rename to x86_64.Dockerfile