Detect Jenkins as well as Kokoro.

Change-Id: Ie36a06613f21681d69e776e972767272df47659e
diff --git a/build/bash/common.inc b/build/bash/common.inc
index dd70247..821da0c 100644
--- a/build/bash/common.inc
+++ b/build/bash/common.inc
@@ -49,6 +49,12 @@
 	return $?
 }
 
+# Returns true if the environment contains Jenkins build variables.
+function is_jenkins_build() {
+	[ -v JENKINS_HOME ]
+	return $?
+}
+
 # Returns true if the `.repo_manifest` folder exists. The folder should contain
 # the manifest and be present in all Repo builds. Eventually this should be
 # obsolete as we switch exclusively to Repo.