Merge branch 'master' into patch-1
This commit is contained in:
commit
38f3ca8848
@ -1,6 +1,12 @@
|
|||||||
sudo: required
|
sudo: required
|
||||||
language: python
|
language: python
|
||||||
|
|
||||||
|
env:
|
||||||
|
- BUILD=release
|
||||||
|
- BUILD=prerelease
|
||||||
|
- BUILD=branches
|
||||||
|
- BUILD=special
|
||||||
|
|
||||||
git:
|
git:
|
||||||
depth: 5
|
depth: 5
|
||||||
|
|
||||||
|
38
build-all.sh
38
build-all.sh
@ -1,5 +1,16 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Builds all Docker images this project provides
|
# Builds all Docker images this project provides
|
||||||
|
# Arguments:
|
||||||
|
# BUILD: The release to build.
|
||||||
|
# Allowed: release, prerelease, branches, special
|
||||||
|
# Default: undefined
|
||||||
|
|
||||||
|
echo "▶️ $0 $*"
|
||||||
|
|
||||||
|
ALL_BUILDS=("release" "prerelease" "branches" "special")
|
||||||
|
BUILDS=("${BUILD:-"${ALL_BUILDS[@]}"}")
|
||||||
|
|
||||||
|
echo "⚙️ Configured builds: ${BUILDS[*]}"
|
||||||
|
|
||||||
VARIANTS=("" "ldap")
|
VARIANTS=("" "ldap")
|
||||||
|
|
||||||
@ -35,23 +46,40 @@ if [ ! -z "${DEBUG}" ] || \
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "🛠 Building '$DOCKERFILE'"
|
for BUILD in "${BUILDS[@]}"; do
|
||||||
|
echo "🛠 Building '$BUILD' from '$DOCKERFILE'"
|
||||||
|
case $BUILD in
|
||||||
|
release)
|
||||||
# build the latest release
|
# build the latest release
|
||||||
# shellcheck disable=SC2068
|
# shellcheck disable=SC2068
|
||||||
./build-latest.sh $@ || ERROR=1
|
./build-latest.sh $@ || ERROR=1
|
||||||
|
;;
|
||||||
|
prerelease)
|
||||||
# build the latest pre-release
|
# build the latest pre-release
|
||||||
# shellcheck disable=SC2068
|
# shellcheck disable=SC2068
|
||||||
PRERELEASE=true ./build-latest.sh $@ || ERROR=1
|
PRERELEASE=true ./build-latest.sh $@ || ERROR=1
|
||||||
|
;;
|
||||||
|
branches)
|
||||||
# build all branches
|
# build all branches
|
||||||
# shellcheck disable=SC2068
|
# shellcheck disable=SC2068
|
||||||
./build-branches.sh $@ || ERROR=1
|
./build-branches.sh $@ || ERROR=1
|
||||||
|
;;
|
||||||
|
special)
|
||||||
# special build
|
# special build
|
||||||
# shellcheck disable=SC2068
|
# shellcheck disable=SC2068
|
||||||
SRC_ORG=lampwins TAG=webhooks-backend ./build.sh "feature/webhooks-backend" $@ || ERROR=1
|
SRC_ORG=lampwins TAG=webhooks-backend ./build.sh "feature/webhooks-backend" $@ || ERROR=1
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "🚨 Unrecognized build '$BUILD'."
|
||||||
|
|
||||||
|
if [ -z "$DEBUG" ]; then
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "⚠️ Would exit here with code '1', but DEBUG is enabled."
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
echo "❎ Not building anything."
|
echo "❎ Not building anything."
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Builds all published branches
|
# Builds develop, develop-* and master branches
|
||||||
|
|
||||||
|
echo "▶️ $0 $*"
|
||||||
|
|
||||||
ORIGINAL_GITHUB_REPO="digitalocean/netbox"
|
ORIGINAL_GITHUB_REPO="digitalocean/netbox"
|
||||||
GITHUB_REPO="${GITHUB_REPO-$ORIGINAL_GITHUB_REPO}"
|
GITHUB_REPO="${GITHUB_REPO-$ORIGINAL_GITHUB_REPO}"
|
||||||
@ -7,7 +9,7 @@ URL_RELEASES="https://api.github.com/repos/${GITHUB_REPO}/branches"
|
|||||||
|
|
||||||
CURL="curl -sS"
|
CURL="curl -sS"
|
||||||
|
|
||||||
BRANCHES=$($CURL "${URL_RELEASES}" | jq -r 'map(.name) | .[] | scan("^[^v].+")')
|
BRANCHES=$($CURL "${URL_RELEASES}" | jq -r 'map(.name) | .[] | scan("^[^v].+") | match("^(master|develop).*") | .string')
|
||||||
|
|
||||||
ERROR=0
|
ERROR=0
|
||||||
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Builds the latest released version
|
# Builds the latest released version
|
||||||
|
|
||||||
|
echo "▶️ $0 $*"
|
||||||
|
|
||||||
ORIGINAL_GITHUB_REPO="digitalocean/netbox"
|
ORIGINAL_GITHUB_REPO="digitalocean/netbox"
|
||||||
GITHUB_REPO="${GITHUB_REPO-$ORIGINAL_GITHUB_REPO}"
|
GITHUB_REPO="${GITHUB_REPO-$ORIGINAL_GITHUB_REPO}"
|
||||||
URL_RELEASES="https://api.github.com/repos/${GITHUB_REPO}/releases"
|
URL_RELEASES="https://api.github.com/repos/${GITHUB_REPO}/releases"
|
||||||
|
2
build.sh
2
build.sh
@ -1,6 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Builds the Dockerfile[.variant] and injects tgz'ed Netbox code from Github
|
# Builds the Dockerfile[.variant] and injects tgz'ed Netbox code from Github
|
||||||
|
|
||||||
|
echo "▶️ $0 $*"
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [ "${1}x" == "x" ] || [ "${1}" == "--help" ] || [ "${1}" == "-h" ]; then
|
if [ "${1}x" == "x" ] || [ "${1}" == "--help" ] || [ "${1}" == "-h" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user