Try to get PR builds working

This commit is contained in:
Christian Mäder 2019-10-10 14:08:31 +02:00 committed by Christian Mäder
parent d0ebb34432
commit d0c9dfe2e5
2 changed files with 7 additions and 3 deletions

View File

@ -30,6 +30,10 @@ run_build() {
# shellcheck disable=SC2068 # shellcheck disable=SC2068
./build-branches.sh $@ ./build-branches.sh $@
;; ;;
this) # Pull Requests
# build all branches, but never push
./build-branches.sh
;;
*) *)
echo "🚨 Unrecognized build '$BUILD'." echo "🚨 Unrecognized build '$BUILD'."

View File

@ -2,13 +2,13 @@
. hooks/common . hooks/common
if [ "${BUILD}" == "BRANCHES" ]; then # test 'branches' and 'this' (i.e. pull request) builds
if [ "${BUILD}" == "branches" ] || [ "${BUILD}" == "this" ]; then
echo "🐳🐳🐳 Testing" echo "🐳🐳🐳 Testing"
export DOCKER_TARGET="main" export DOCKER_TARGET="main"
docker-compose pull --parallel
docker-compose build
docker-compose run netbox ./manage.py test docker-compose run netbox ./manage.py test
docker-compose down -v
else else
echo "🐳🐳🐳 No tests are implemented for build '${BUILD}'." echo "🐳🐳🐳 No tests are implemented for build '${BUILD}'."
fi fi