Allow running the tests with specific versions of Jenkins
diff --git a/tests/test_helpers.bash b/tests/test_helpers.bash
index ed1462c..da6d381 100644
--- a/tests/test_helpers.bash
+++ b/tests/test_helpers.bash
@@ -41,6 +41,14 @@
     false
 }
 
+function docker_build {
+    if [ -n "$JENKINS_VERSION" ]; then
+        docker build --build-arg JENKINS_VERSION=$JENKINS_VERSION --build-arg JENKINS_SHA=$JENKINS_SHA "$@"
+    else
+        docker build "$@"
+    fi
+}
+
 function get_jenkins_url {
     if [ -z "${DOCKER_HOST}" ]; then
         DOCKER_IP=localhost