From 5f0fb5c7c9a53d70e3233f98f0067a50c23c4033 Mon Sep 17 00:00:00 2001 From: Aric Gardner Date: Wed, 17 Aug 2016 15:02:27 -0400 Subject: 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 --- utils/jenkins-jnlp-connect.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'utils/jenkins-jnlp-connect.sh') 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 -- cgit 1.2.3-korg