I have a Jenkinfile file with this block:
stage('Assemble') {
steps {
youMonitor {
bat "gradlew --info --stacktrace -Dorg.gradle.java.home=${winJavaHome} -PincludeExtraProjects=true -PbuildUi=false :assemble"
}
}
}
The gradle assemble runs and completes just fine, but Jenkins interprets the stageResult value as FAILURE.
If I remove the "youMonitor" block, the stageResult value is SUCCESS.
At the bottom of the log I see references to JAVA_TOOL_OPTIONS but other than that, the fail and success logs appear the same:
[2020-01-02T21:08:36.638Z] Picked up JAVA_TOOL_OPTIONS: "-agentlib:youmonitor="
[2020-01-02T21:08:36.638Z] Stopped 1 worker daemon(s).
[2020-01-02T21:08:36.639Z] Picked up JAVA_TOOL_OPTIONS: -agentlib:youmonitor
Is youMonitor compatible with gradle? Am I using it incorrectly in the jenkinsfile?
Thank you