netbox-docker/hooks/test
Christian Mäder d0ebb34432 Refactor to multistage builds
This commit introduces a huge change in the build process.

What changed:

- Dockerfile.ldap was integrated into Dockerfile as a seperate
  [build stage][multistage-build].
- All the build scripts were refactored according to this.
- The `docker-compose.yml` file was adjusted likewise.
- The main build script, `/build.sh`, now always builds all
  targets (formerly called variants).
- The minimal requirements for Docker and docker-compose
  have increased.
- The build on hub.docker.com must be adjusted.

This change should also fix #156 permanently.

[multistage-build]: https://docs.docker.com/develop/develop-images/multistage-build/
2019-10-15 00:34:15 +02:00

15 lines
306 B
Bash
Executable File

#!/bin/bash
. hooks/common
if [ "${BUILD}" == "BRANCHES" ]; then
echo "🐳🐳🐳 Testing"
export DOCKER_TARGET="main"
docker-compose pull --parallel
docker-compose build
docker-compose run netbox ./manage.py test
else
echo "🐳🐳🐳 No tests are implemented for build '${BUILD}'."
fi