diff --git a/Jenkinsfile b/Jenkinsfile index abb132b..be4726b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -47,8 +47,12 @@ pipeline { env.GIT_PATH = env.GIT_PATH.substring(1) } if(env.GIT_PATH.startsWith("~/")) { - env.GIT_PATH = env.GIT_PATH.substring(2, (env.GIT_PATH.length() - 1)) + env.GIT_PATH = env.GIT_PATH.substring(2) } + if(env.GIT_PATH.contains("../")) { + error("GIT_PATH must not contain '../'") + ] + // be sure branch is set env.GIT_BRANCH = params.GIT_BRANCH ?: '*/master' }