I have a shared library with a .groovy script that I call in a jenkins file like this:
MySharedLibFunction{ .. some args}
I also have a .ps1 file in my shared library that I want to execute. But if I execute powershell pwd
from my shared library function, when I call this function from my jenkinsfile, the current working directory is the jenkins working directory of my pipeline, which contains the jenkinsfile (usually this is what you want).
Is there a way to access files in a shared library? I want to dopowershell -File ps1FileInMySharedLibVarsFolder.ps1
source
share