diff --git a/vars/hook.groovy b/vars/hook.groovy index c0efde6..0fa6f0d 100644 --- a/vars/hook.groovy +++ b/vars/hook.groovy @@ -1,6 +1,5 @@ def call(String name) { - def rootDir = pwd() - def filepath = "${rootDir}/.jenkins/${name}.groovy" + def filepath = "${env.WORKSPACE}/.jenkins/${name}.groovy" def exists = fileExists(filepath) if (!exists) { println("No hook '${filepath}' script. Skipping.")