Jenkins stage failing only when using youMonitor block

Questions about YourKit YouMonitor
Locked
bbianchi
Posts: 7
Joined: Mon Dec 30, 2019 9:09 pm

Jenkins stage failing only when using youMonitor block

Post by bbianchi »

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
Ilya Kalikin
Posts: 16
Joined: Mon Jun 12, 2017 3:06 pm

Re: Jenkins stage failing only when using youMonitor block

Post by Ilya Kalikin »

Yes, Gradle is supported. Such Jenkins pipeline script should work. What Java and Gradle versions are used? Could you add --no-daemon option to gradlew call and see if that helps.

Maybe YouMonitor agent caused an error in the JVM. It would help if you send YouMonitor agent logs from <jenkins user home>\.youmonitor\log\ to [email protected] for examination.
Vladimir Kondratyev
Posts: 1624
Joined: Tue Aug 10, 2004 7:52 pm

Re: Jenkins stage failing only when using youMonitor block

Post by Vladimir Kondratyev »

We have just released build #64 of YouMonitor 2019.1
https://www.yourkit.com/youmonitor/download/

New build fixes exception which we've found in your logs. And we added more logging to find an
issues with empty repository list. Please install #64 and send us new log from Jenkins plugin.

Best regards,
Vladimir Kondratyev
YourKit GmbH
http://www.yourkit.com
"Don't get lost in data, get information!"
Locked