⚙️ Parallel builds
This commit is contained in:
parent
8ffe6529c9
commit
626195d00f
@ -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
|
||||||
|
|
||||||
|
58
build-all.sh
58
build-all.sh
@ -1,5 +1,14 @@
|
|||||||
#!/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
|
||||||
|
|
||||||
|
ALL_BUILDS=("release" "prerelease" "branches" "special")
|
||||||
|
BUILDS=("${BUILD:-"${ALL_BUILDS[@]}"}")
|
||||||
|
|
||||||
|
echo "⚙️ Configured builds: ${BUILDS[*]}"
|
||||||
|
|
||||||
VARIANTS=("" "ldap")
|
VARIANTS=("" "ldap")
|
||||||
|
|
||||||
@ -35,23 +44,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
|
||||||
|
# shellcheck disable=SC2068
|
||||||
|
./build-latest.sh $@ || ERROR=1
|
||||||
|
;;
|
||||||
|
prerelease)
|
||||||
|
# build the latest pre-release
|
||||||
|
# shellcheck disable=SC2068
|
||||||
|
PRERELEASE=true ./build-latest.sh $@ || ERROR=1
|
||||||
|
;;
|
||||||
|
branches)
|
||||||
|
# build all branches
|
||||||
|
# shellcheck disable=SC2068
|
||||||
|
./build-branches.sh $@ || ERROR=1
|
||||||
|
;;
|
||||||
|
special)
|
||||||
|
# special build
|
||||||
|
# shellcheck disable=SC2068
|
||||||
|
SRC_ORG=lampwins TAG=webhooks-backend ./build.sh "feature/webhooks-backend" $@ || ERROR=1
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "🚨 Unrecognized build '$BUILD'."
|
||||||
|
|
||||||
# build the latest release
|
if [ -z "$DEBUG" ]; then
|
||||||
# shellcheck disable=SC2068
|
exit 1
|
||||||
./build-latest.sh $@ || ERROR=1
|
else
|
||||||
|
echo "⚠️ Would exit here with code '1', but DEBUG is enabled."
|
||||||
# build the latest pre-release
|
fi
|
||||||
# shellcheck disable=SC2068
|
;;
|
||||||
PRERELEASE=true ./build-latest.sh $@ || ERROR=1
|
esac
|
||||||
|
done
|
||||||
# build all branches
|
|
||||||
# shellcheck disable=SC2068
|
|
||||||
./build-branches.sh $@ || ERROR=1
|
|
||||||
|
|
||||||
# special build
|
|
||||||
# shellcheck disable=SC2068
|
|
||||||
SRC_ORG=lampwins TAG=webhooks-backend ./build.sh "feature/webhooks-backend" $@ || ERROR=1
|
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
echo "❎ Not building anything."
|
echo "❎ Not building anything."
|
||||||
|
Loading…
Reference in New Issue
Block a user