From: Aric Gardner Date: Wed, 17 Aug 2016 19:02:27 +0000 (-0400) Subject: Jenkins connection script needs to be run from $jenkinshome X-Git-Tag: colorado.1.0~147^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=5f0fb5c7c9a53d70e3233f98f0067a50c23c4033;p=releng.git Jenkins connection script needs to be run from $jenkinshome Exit if script is run from the wrong directory Change-Id: I693ab65b4439c5b4d3b609e95295fa43e8cd3a58 Signed-off-by: Aric Gardner --- diff --git a/utils/jenkins-jnlp-connect.sh b/utils/jenkins-jnlp-connect.sh index 8dcaf35c5..4b710cab2 100755 --- a/utils/jenkins-jnlp-connect.sh +++ b/utils/jenkins-jnlp-connect.sh @@ -38,6 +38,11 @@ main () { exit 1 fi + if [[ $(pwd) != "$jenkinshome" ]]; then + echo "This script needs to be run from the jenkins users home dir" + exit 1 + fi + if [[ -z $slave_name || -z $slave_secret ]]; then echo "slave name or secret not defined, please edit this file to define it" exit 1