❇️ Automatically build all branches

.. which are not version branches.
This commit is contained in:
Christian Mäder 2018-01-30 11:45:53 +01:00
parent 96d414b46d
commit 2e819bf094
No known key found for this signature in database
GPG Key ID: 92FFD0A711F196BB
2 changed files with 15 additions and 3 deletions

View File

@ -20,9 +20,7 @@ after_script:
after_success: after_success:
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" - docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
- if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then - if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then
./build.sh master --push; ./build-branches.sh --push;
./build.sh develop --push;
./build.sh develop-2.3 --push;
./build-latest.sh --push; ./build-latest.sh --push;
PRERELEASE=true ./build-latest.sh --push; PRERELEASE=true ./build-latest.sh --push;
fi fi

14
build-branches.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
ORIGINAL_GITHUB_REPO="digitalocean/netbox"
GITHUB_REPO="${GITHUB_REPO-$ORIGINAL_GITHUB_REPO}"
URL_RELEASES="https://api.github.com/repos/${GITHUB_REPO}/branches"
CURL_OPTS="-s"
CURL="curl ${CURL_OPTS}"
BRANCHES=$($CURL "${URL_RELEASES}" | jq -r 'map(.name) | .[] | scan("^[^v].+")')
for BRANCH in $BRANCHES; do
./build.sh "${BRANCH}" $@
done