2
0
mirror of https://github.com/VinylDNS/vinyldns synced 2025-08-22 10:10:12 +00:00
vinyldns/build/docker/test/run-tests.py

17 lines
359 B
Python
Raw Normal View History

Support building docker images locally and without SBT (#753) Fixes #744 Overhauls our docker release process to run releases of docker outside of SBT. This was tested through the signing process deploying SNAPSHOT images to docker hub. All images do a git clone to pull vinyldns, and perform the build of the container based on that git clone. - A new `build` directory contains the things to be built, for this PR only the docker images are here. Anticipate possibly pulling in other artifacts in the future. - `build/docker` contains all of the docker setup - `build/docker/test` contains a func test docker image that can be used to test any VinylDNS API instance - `build/docker/test-bind9` contains our bind9 setup - `build/docker/api` is a MySQL only API distribution - `build/docker/portal` is a MySQL only Portal distribution In addition, a few files are added to make the build easier: - `build/start.sh` starts a given vinyldns version - `build/stop.sh` stops the current running vinyldns setup - `build/release.sh` this is the **MAIN** guy that performs the build. Lots of arguments that are useful for testing. Can provide a repository (for publishing to a docker register that is not docker hub), for building clean vs. assuming docker images. Besides building everything, also runs func tests (smoke tests) against the docker image before completing. Added a `README.md` for others to follow along with To test.. 1. Make sure you increase your docker machine settings to 4GB (the default of 2GB failed) 2. Go to the `build` directory 3. From there, run `./release.sh -c -t 111` to only build the docker images, this should build `0.9.4-b111` 4. Start it up, run `./start.sh -v 0.9.4-b111` 5. Login to the portal at http://localhost:9001 6. When finished, run `./stop.sh` from the build directory *If you see an error code 137 error, you need to increase your memory*
2019-10-22 19:11:28 -04:00
#!/usr/bin/env python
import os
import sys
basedir = os.path.dirname(os.path.realpath(__file__))
report_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../target/pytest_reports')
if not os.path.exists(report_dir):
os.system('mkdir -p ' + report_dir)
import pytest
result = 1
result = pytest.main(list(sys.argv[1:]))
sys.exit(result)