I've been having some problems with a groovy script;
sh '''
echo \'Starting script\';
sleep 5;
echo \'pwd\';
sleep 5;
pwd;
sleep 5;
find / -name jenkins.war -type f;
sleep 5;
'''
Commands that take longer to execute always cause the pipeline to fail; all commands except find
are run successfully. In the logs (browser), a number of files are shown before the pipeline fails with message:
Jenkins build has status: FAILURE. Notifying Bitbucket with state: FAILED.
The issue is that there is no direct access to the jenkins server (no easy way to check logs).
I'm not sure if I'm going about this the right way but are there any settings that could cause such behavior?