I have a groovy file, I want to run from the Jenkinsfile.
ie. load script.groovy
load script.groovy
However, I am not sure how I can reference this file if it is store
Had the same problem. Ended up with extra clone operation to get copy of script repo under workspace dir so I can reliably access groovy files in it:
dir ('SCRIPTS_DIR') { checkout scm commonScripts = load 'subdir/Common.groovy' // no def, so script is global }