Fully featured low overhead profiler for Java EE and Java SE platforms.
Performance monitoring and profiling of Jenkins, TeamCity, Gradle, Maven, Ant, JUnit and TestNG.
Easy to use performance and memory profiler for .NET framework.

Jenkins Declarative Multibranch Pipeline

Moderators: Vladimir Kondratyev, Anton Katilin

Jenkins Declarative Multibranch Pipeline

Postby kthoms » Sat Oct 13, 2018 4:18 pm

I wanted to give YouMonitor a test on one of my Eclipse Open Source projects. We are using usually a Multibranch Pipeline job defined as a Declarative Pipeline with a Jenkinsfile.

In the configuration of a Multibranch Pipeline job there is no Build Environment entry, it is all defined by the Jenkinsfile. How should YouMonitor be activated in there?

Example: https://github.com/eclipse/xtext-lib/bl ... enkinsfile

About Pipelines:
https://jenkins.io/doc/book/pipeline/#s ... ndamentals
kthoms
 
Posts: 1
Joined: Sat Oct 13, 2018 4:11 pm

Re: Jenkins Declarative Multibranch Pipeline

Postby Ilya Kalikin » Mon Oct 15, 2018 10:03 am

The syntax from the instructions should work in Jenkins pipeline:

Code: Select all
node {
  youMonitor {
    // ...
  }
}


Make sure to install Jenkins plugin first.
When the build is completed use "Open Repository..." action to see the results.
Ilya Kalikin
 
Posts: 14
Joined: Mon Jun 12, 2017 3:06 pm

Re: Jenkins Declarative Multibranch Pipeline

Postby bbianchi » Thu Jan 02, 2020 4:26 pm

I have a multibranch pipeline as well. The data seems to be getting stored on the Jenkins server at /var/lib/jenkins/youmonitor/repositories which is fine, but when I open the repo browser UI and login to my Jenkins server using the username/token, after successful authentication, I am told no repositories found.

If I instead choose local directory, and select "/var/lib/jenkins/youmonitor/repositories" everything works, but that option is only available by virtue of the fact that I happen to be running the repo browser UI ON my Jenkins server. If I run it remotely, I am dead in the water.

Why are the repos not registering via Jenkins? Have I missed a step? Thanks!
bbianchi
 
Posts: 7
Joined: Mon Dec 30, 2019 9:09 pm

Re: Jenkins Declarative Multibranch Pipeline

Postby Ilya Kalikin » Thu Jan 02, 2020 4:51 pm

bbianchi wrote:The data seems to be getting stored on the Jenkins server at /var/lib/jenkins/youmonitor/repositories which is fine, but when I open the repo browser UI and login to my Jenkins server using the username/token, after successful authentication, I am told no repositories found.

Hello, do you see repositories on "YourKit YouMonitor" page in "Mange Jenkins" menu?
Ilya Kalikin
 
Posts: 14
Joined: Mon Jun 12, 2017 3:06 pm

Re: Jenkins Declarative Multibranch Pipeline

Postby bbianchi » Thu Jan 02, 2020 7:26 pm

Yes I do actually. I see the one Multibranch Pipeline I am using to test YourMonitor.

But nothing via the repo browser UI if I select my Jenkins server, plugin the URL and user/token.

Where is the repo browser UI configured to look? Maybe it is looking somewhere other than /var/lib/jenkins/yourmonitor/repositories on my Jenkins server?

Thank you.
bbianchi
 
Posts: 7
Joined: Mon Dec 30, 2019 9:09 pm

Re: Jenkins Declarative Multibranch Pipeline

Postby bbianchi » Thu Jan 02, 2020 7:44 pm

This endpoint http://<JENKINSURL>/youmonitor/api/v1/repositories

returns...

{"message":{"repositories":[]}}

Like this case, which does not seem to have a resolution:
viewtopic.php?f=7&t=40386

Yet clearly I see repo data at /var/lib/jenkins/yourmonitor/repositories

And I can load it into the repo browser UI only if I run the browser directly on the Jenkins server and elect to browse local directory and enter the path the repo directory. But that is not a good solution as I am supposed to be able to run the repo browser UI anywhere.

Please advise.

Thank you
bbianchi
 
Posts: 7
Joined: Mon Dec 30, 2019 9:09 pm

Re: Jenkins Declarative Multibranch Pipeline

Postby Vladimir Kondratyev » Fri Jan 03, 2020 11:40 am

Please send us log from Manage Jenkins -> System Log -> YourKit YouMonitor. You can post it here or send by email to [email protected].
Vladimir Kondratyev
 
Posts: 1512
Joined: Tue Aug 10, 2004 7:52 pm
Location: Düsseldorf, Germany

Re: Jenkins Declarative Multibranch Pipeline

Postby bbianchi » Mon Jan 06, 2020 12:58 pm

Here is the log (below). It appears the repo data is being stored on the Jenkins server properly, but you tell me :)

Again, I can access it through the repo browser UI if, and only if, I run it on the Jenkins server itself, select "Open local repository" and navigate to the repo by hand.

It does NOT work if I launch the repo browser UI from a remote system and select Jenkins, enter URL, username and token. The authentication is successful (I do not get error 403), I just simply get "No repositories".

Thank you.

Dec 30, 2019 9:13:53 AM INFO com.yourkit.plugins.jenkins.PluginLogger info
Updating super repository /var/lib/jenkins/youmonitor/repositories
Dec 30, 2019 9:13:53 AM INFO com.yourkit.plugins.jenkins.PluginLogger info
Skip /var/lib/jenkins/youmonitor/repositories; cannot list super repository directory
Dec 30, 2019 11:28:51 AM INFO com.yourkit.plugins.jenkins.PluginLogger info
Updating super repository /var/lib/jenkins/youmonitor/repositories
Dec 30, 2019 11:28:51 AM INFO com.yourkit.plugins.jenkins.PluginLogger info
Add /var/lib/jenkins/youmonitor/repositories/ev31fnge6cym86q5
Dec 30, 2019 3:21:41 PM INFO com.yourkit.plugins.jenkins.PluginLogger info
Updating super repository /var/lib/jenkins/youmonitor/repositories
Dec 30, 2019 3:21:41 PM INFO com.yourkit.plugins.jenkins.PluginLogger info
Add /var/lib/jenkins/youmonitor/repositories/ev31fnge6cym86q5
Dec 30, 2019 3:54:50 PM INFO com.yourkit.plugins.jenkins.PluginLogger info
Updating super repository /var/lib/jenkins/youmonitor/repositories
Dec 30, 2019 3:54:50 PM INFO com.yourkit.plugins.jenkins.PluginLogger info
Add /var/lib/jenkins/youmonitor/repositories/ev31fnge6cym86q5
Dec 30, 2019 4:28:03 PM INFO com.yourkit.plugins.jenkins.PluginLogger info
Updating super repository /var/lib/jenkins/youmonitor/repositories
Dec 30, 2019 4:28:03 PM INFO com.yourkit.plugins.jenkins.PluginLogger info
Add /var/lib/jenkins/youmonitor/repositories/ev31fnge6cym86q5
Jan 02, 2020 9:30:15 AM INFO com.yourkit.plugins.jenkins.PluginLogger info
Updating super repository /var/lib/jenkins/youmonitor/repositories
Jan 02, 2020 9:30:15 AM INFO com.yourkit.plugins.jenkins.PluginLogger info
Add /var/lib/jenkins/youmonitor/repositories/ev31fnge6cym86q5
Jan 02, 2020 10:18:45 AM INFO com.yourkit.plugins.jenkins.PluginLogger info
Updating super repository /var/lib/jenkins/youmonitor/repositories
Jan 02, 2020 10:18:45 AM INFO com.yourkit.plugins.jenkins.PluginLogger info
Add /var/lib/jenkins/youmonitor/repositories/ev31fnge6cym86q5
Jan 02, 2020 12:33:37 PM INFO com.yourkit.plugins.jenkins.PluginLogger info
Updating super repository /var/lib/jenkins/youmonitor/repositories
Jan 02, 2020 12:33:37 PM INFO com.yourkit.plugins.jenkins.PluginLogger info
Add /var/lib/jenkins/youmonitor/repositories/ev31fnge6cym86q5
Jan 02, 2020 1:01:28 PM INFO com.yourkit.plugins.jenkins.PluginLogger info
Updating super repository /var/lib/jenkins/youmonitor/repositories
Jan 02, 2020 1:01:28 PM INFO com.yourkit.plugins.jenkins.PluginLogger info
Add /var/lib/jenkins/youmonitor/repositories/ev31fnge6cym86q5
Jan 02, 2020 2:16:14 PM INFO com.yourkit.plugins.jenkins.PluginLogger info
Updating super repository /var/lib/jenkins/youmonitor/repositories
Jan 02, 2020 2:16:14 PM INFO com.yourkit.plugins.jenkins.PluginLogger info
Add /var/lib/jenkins/youmonitor/repositories/ev31fnge6cym86q5
Jan 02, 2020 2:43:49 PM INFO com.yourkit.plugins.jenkins.PluginLogger info
Updating super repository /var/lib/jenkins/youmonitor/repositories
Jan 02, 2020 2:43:49 PM INFO com.yourkit.plugins.jenkins.PluginLogger info
Add /var/lib/jenkins/youmonitor/repositories/ev31fnge6cym86q5
Jan 02, 2020 3:44:11 PM INFO com.yourkit.plugins.jenkins.PluginLogger info
Updating super repository /var/lib/jenkins/youmonitor/repositories
Jan 02, 2020 3:44:11 PM INFO com.yourkit.plugins.jenkins.PluginLogger info
Add /var/lib/jenkins/youmonitor/repositories/ev31fnge6cym86q5
Jan 02, 2020 4:10:07 PM INFO com.yourkit.plugins.jenkins.PluginLogger info
Updating super repository /var/lib/jenkins/youmonitor/repositories
Jan 02, 2020 4:10:07 PM INFO com.yourkit.plugins.jenkins.PluginLogger info
Add /var/lib/jenkins/youmonitor/repositories/ev31fnge6cym86q5
Jan 02, 2020 4:43:45 PM INFO com.yourkit.plugins.jenkins.PluginLogger info
Updating super repository /var/lib/jenkins/youmonitor/repositories
Jan 02, 2020 4:43:45 PM INFO com.yourkit.plugins.jenkins.PluginLogger info
Add /var/lib/jenkins/youmonitor/repositories/ev31fnge6cym86q5
Jan 02, 2020 5:44:41 PM INFO com.yourkit.plugins.jenkins.PluginLogger info
Updating super repository /var/lib/jenkins/youmonitor/repositories
Jan 02, 2020 5:44:41 PM INFO com.yourkit.plugins.jenkins.PluginLogger info
Add /var/lib/jenkins/youmonitor/repositories/ev31fnge6cym86q5
Jan 03, 2020 9:59:56 AM INFO com.yourkit.plugins.jenkins.PluginLogger info
Updating super repository /var/lib/jenkins/youmonitor/repositories
Jan 03, 2020 9:59:56 AM INFO com.yourkit.plugins.jenkins.PluginLogger info
Add /var/lib/jenkins/youmonitor/repositories/ev31fnge6cym86q5
Jan 03, 2020 11:00:23 AM INFO com.yourkit.plugins.jenkins.PluginLogger info
Updating super repository /var/lib/jenkins/youmonitor/repositories
Jan 03, 2020 11:00:23 AM INFO com.yourkit.plugins.jenkins.PluginLogger info
Add /var/lib/jenkins/youmonitor/repositories/ev31fnge6cym86q5
Jan 03, 2020 11:55:01 AM INFO com.yourkit.plugins.jenkins.PluginLogger info
Updating super repository /var/lib/jenkins/youmonitor/repositories
Jan 03, 2020 11:55:01 AM INFO com.yourkit.plugins.jenkins.PluginLogger info
Add /var/lib/jenkins/youmonitor/repositories/ev31fnge6cym86q5
Jan 03, 2020 12:03:04 PM INFO com.yourkit.plugins.jenkins.PluginLogger info
Updating super repository /var/lib/jenkins/youmonitor/repositories
Jan 03, 2020 12:03:04 PM INFO com.yourkit.plugins.jenkins.PluginLogger info
Add /var/lib/jenkins/youmonitor/repositories/ev31fnge6cym86q5
Jan 03, 2020 12:34:29 PM INFO com.yourkit.plugins.jenkins.PluginLogger info
Updating super repository /var/lib/jenkins/youmonitor/repositories
Jan 03, 2020 12:34:29 PM INFO com.yourkit.plugins.jenkins.PluginLogger info
Add /var/lib/jenkins/youmonitor/repositories/ev31fnge6cym86q5
bbianchi
 
Posts: 7
Joined: Mon Dec 30, 2019 9:09 pm

Re: Jenkins Declarative Multibranch Pipeline

Postby Vladimir Kondratyev » Mon Jan 06, 2020 7:25 pm

Looks like a problem with file permissions. What is the output of the command below?
Code: Select all
ls -l /var/lib/jenkins/youmonitor/repositories



Best regards,
Vladimir Kondratyev
YourKit GmbH
http://www.yourkit.com
"Don't get lost in data, get information!"
Vladimir Kondratyev
 
Posts: 1512
Joined: Tue Aug 10, 2004 7:52 pm
Location: Düsseldorf, Germany


Return to YouMonitor

Who is online

Users browsing this forum: No registered users and 1 guest

YourKit uses cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from.

By browsing our website, you consent to our use of cookies and other tracking technologies in accordance with the Privacy Policy.