testing: add NO_DOCKER environment variable to skip image building (bug 1287890); r=rwood
authorGregory Szorc <gps@mozilla.com>
Tue, 19 Jul 2016 19:40:56 -0700
changeset 8980 044597f4a6a5a588ede89e4b1eb30bf1ac5f7545
parent 8973 9bf139a2cdbe4c02eefbdcb1196b73b3d094619f
child 8982 94faac2a3edfc9eee48b85c034649870220f3d53
child 8993 c05e7f5d77d1a2425cc4b40647518a0c90d172e8
push id1039
push userbmo:gps@mozilla.com
push dateWed, 20 Jul 2016 20:38:06 +0000
reviewersrwood
bugs1287890
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
create-test-environment
--- 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