I want all my jenkins logs of my current build in groovy
env.logs = currentBuild.rawBuild.getLog(1000).join('\n')
This works, but the problem here is I have to specify the amount of lines. When I use:
env.logs = currentBuild.rawBuild.getLog().join('\n')
env.logs
is empty. What is the right command to get all the logs without specifying the amount of lines. Is this possible?
currentBuild.rawBuild.log seems to work but is deprecated?