testing: add NO_DOCKER environment variable to skip image building (
bug 1287890); r=rwood
If NO_DOCKER is set, we won't attempt to build Docker images.
This variable can be set in the Jenkins test environment to make the
"no Docker" test environment start faster.
MozReview-Commit-ID: 3C3rTYcWJjj
--- a/create-test-environment
+++ b/create-test-environment
@@ -216,21 +216,25 @@ echo finished installing Mercurials
if [ ! -d venv/git-cinnabar ]; then
echo "Cloning git-cinnabar"
git clone --branch release https://github.com/glandium/git-cinnabar.git venv/git-cinnabar
fi
git -C venv/git-cinnabar pull
-echo ""
-echo "Building Docker images."
-echo "This could take a while and may consume a lot of internet bandwidth."
-echo "If you don't want Docker images, it is safe to hit CTRL+c to abort this."
+if [ -z "${NO_DOCKER}" ]; then
+ echo ""
+ echo "Building Docker images."
+ echo "This could take a while and may consume a lot of internet bandwidth."
+ echo "If you don't want Docker images, it is safe to hit CTRL+c to abort this."
-./d0cker build-all $FORKS || {
- echo "You will not be able to run tests that require Docker.";
- echo "Please see https://docs.docker.com/installation/ for how to install Docker.";
- echo "When Docker is installed, re-run this script";
- exit 1
-}
+ ./d0cker build-all $FORKS || {
+ echo "You will not be able to run tests that require Docker.";
+ echo "Please see https://docs.docker.com/installation/ for how to install Docker.";
+ echo "When Docker is installed, re-run this script";
+ exit 1
+ }
+else
+ echo "Not building Docker images because NO_DOCKER is set."
+fi
echo finished creating test environment