How can I integrate Jenkins to POWERBI, i.e, getting jenkins jobs build and failed And JOb NUMBERS to POWERBI.
I don't thing there is a direct way of doing it currently.
(https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/6798689-jenkins-data-source)
But as a workaround you can always create a groovy script to read jenkins log and use database to store data.
From there you can use powerBI to create reports.
Related
From what I understand, Jenkins job creation can be automated using
the Job DSL Plugin - however to evaluate the DSL, a seed job needs to be created by hand first.
I want to automate job creation without any human interaction - is there a way to transform the DSL to the corresponding .../.jenkins/jobs/job.xml without using the web front end?
You have 2 options to achieve this
Create a Jenkins Job which creates the seed job using DSL. Job-dsl provides a capability to write configure block and if you look at the Seed job, it is nothing but pulling the DSL code from git repository. Inject the org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition through Configure block , it should work
The more elegant approach would be to use Jenkins CLI. If you are conversant with Java, you can use Jenkins Java client API and write a Small App which would create the Seed Job
JenkinsServer jenkinsServer = new JenkinsServer(new URI(jenkinsurl), userid, password);
jenkinsServer.createJob("Seed Job Name", <>, true);
I am running jobs in Jenkins. I want to share the Jenkins job result in Jira. I have tried various plugins but failed to achieve my objective.
https://wiki.jenkins-ci.org/display/JENKINS/JIRA+Plugin
If you also want to use this feature, you need to supply a valid user id/password. If you need the comment only to be visible to a certain JIRA group, e.g. Software Development, enter the groupname.
Now you also need to configure jobs. I figured you might not always have write access to the JIRA (say you have a Jenkins build for one of the Apache commons project that you depend on), so that's why this is optional.
Can someone point out a plugin that can aggregate all results from all jobs into one uniform Pass/Fail/Skipped dashboard?
I am currently using the dashboard view in jenkins that shows me grids, pie charts and test trends using Junit results.
I am now using Calabash and would like to publish the Cucumber reports to the same dashboard.
If someone can point me out to a dashboard that can consume all formats so I can have a centralized reporting page I would appreciate it.
Dashing would be an ideal choice since it is highly customisable.
Check it out from http://dashing.io
There are plenty 3rd party libs that does integration with jenkins and uses dashing in github as well.
Try integrating influxdb with jenkins.
Why influxdb?
Open source
Its time series database
Existing jenkins plugin
Easier to build query using GUI, no need to learn flux query to
get required data
Existing dashboard templates
Easier to connect to Grafana to
visualize, monitor data and create dashboards
Plugin Path: https://plugins.jenkins.io/influxdb/
I need to generate a weekly report on our Jenkins build cluster. One of the reports is to display a list of jobs that have the longest build time.
The solution I can come up with is to parse the "Build history" page on each slave (also master) and for each build of a job, parse the build page and look for "Took x min x sec on slave-xx".
This feels quite cumbersome, does anyone know a better solution using Jenkins API or Groovy script console?
Thanks
You can get the build data for your report through the Jenkins API. For a given job, you can
retrieve the list of builds with duration information using something like:
http://jenkins:8080/job/my-job/api/json?tree=builds[id,number,duration,timestamp,builtOn]
To see a list of all the API-available build data for a given job:
http://jenkins:8080/job/my-job/api/json?tree=builds[*]
Once you have a query that retrieves the job information that you need for
your report, it should be straightforward to loop over the jobs.
Most Jenkins pages have a link at the bottom to the REST API that describes a bit about accessing the API for that page, e.g. http://jenkins:8080/job/my-job/api.
How about using plugins?
Check this out:
https://wiki.jenkins-ci.org/display/JENKINS/build-metrics-plugin
There are few others too which you can try depending on how much customization/features you want to do/display:
https://wiki.jenkins-ci.org/display/JENKINS/Global+Build+Stats+Plugin - This is quite extensive
https://wiki.jenkins-ci.org/display/JENKINS/Project+Statistics+Plugin
https://wiki.jenkins-ci.org/display/JENKINS/eXtreme+Feedback+Panel+Plugin
I have three Jenkins projects (Maven jobs, to be exact) that have many available parameters. I've set up a way to automate running these weekly with a set of parameters using the Build Flow plugin so that I end up running a total of 12 builds. I also have a follow-up project that exists only to send an email containing some information about the builds that ran, including a link to all 12 of the artifacts.
My problem is figuring out a way to get the artifact names from all 12 jobs. I think the best way to do that is using the REST API, but I could use some help with that.
I am using the Editable Email Notification plugin, and I have access to the job name and build number. I probably just need a script to grab the artifact name from each job.
Does anyone have experience with this?
I haven't tried the exact case you want, but you should be able to use the depth and tree parameters of the REST API to narrow down the data you need. Start with the API URL for one of the builds, which will be of the form
http://jenkins/job/jobname/buildnumber/api/json