Tried different ways with a multibranch pipeline using global library and Jenkinsfile. Here are the findings: If the Jenkinsfile is doing a skipDefaultCheckout, the JENKINSFILE_PATH will not be set. This is observed irrespective of whether the pipeline uses global library or not. If the pipeline uses global library without skipDefaultCheckout, the JENKINSFILE_PATH environment variable will be set. |