I have done a lot of investigating trying to find examples of running shell() script commands in a preBuildSteps of a mavenJob. All I have found provides simple examples. For example:
mavenJob('example-1') {
preBuildSteps {
shell("echo 'run before Maven'")
}
}
I would like to execute a linux bash script. for example:
shell("bash /scripts/pom.xml.exists.sh")
When I execute, I am receiving the following error message:
- bash /scripts/pom.xml.exists.sh bash: /scripts/pom.xml.exists.sh: No such file or directory
Can someone let me know what I am doing wrong? Conversely, maybe a shell command that will tell me what directory I am supposedly in. Perhaps that will let me know why I get the not found message.
thanks