Jenkins - Update / Edit the left panel label - jenkins

I have configured Jenkins in my system and running fine. But I need to configure the jenkins UI.
a) I want to remove the "Jenkins" logo in header and instead of that I need to add "some text title".
b) I want to edit the left panel labels.
Ex. Build history to Workflow history, My View to Workflow View and Build Executor Status to Workflow Executor Status
Do we have any option to edit the html/config file directly or need to install any plugin to edit these labels. Thanks for your valuable time.

You can use the Jenkin's plugin simple theme:
https://wiki.jenkins.io/display/JENKINS/Simple+Theme+Plugin
You can personalize the CSS, the home page, the favicon. Pretty much everything that you need.
If you just need to do minor changes, you can have a look at https://github.com/jenkinsci/jenkins/tree/master/src/site (site.xml). And the resources folder where the logo is stored.

Related

How can I show an external URL as a build result in Jenkins

Specifically I have a jenkins job that builds and publishes a docker image to our own artifactory instance. What I'm wondering is if it's possible to have the link to that artifactory (or docker hub, or anything else) link in place of the "Last Successful Artifacts" section shown on a build/project page?
For example, if the above image ^^^ had URLs instead of jenkins-archived artifacts. For example the page showing the artifactory page, or something simple like docker pull centos:8.3.2011
As far as i know you cant override the existing links in "Last Successful Artifacts" section, however you have several other options for both FreeStyle and Pipeline jobs:
You can use the Artifactory Plugin to upload your artifacts - it will automatically add links to the artifacts on the build page alongside all relevant Artifactory build info.
You can use the Build Name and Description Setter Plugin to set the build description with the links you want. This description will appear in the upper part of your build page and can include any HTML format you want including icons and links (Safe HTML option must be configured).
You can use the Sidebar Link Plugin to add a customized link to the sidebar menu of your build or project, you can configure the url, link text and the used icon according to your needs.
For using it in pipeline Jobs see the Following Discussion
The Artifactory Plugin is the easiest to use, setting the build description will give you maximum flexibility and the sidebar link is somewhat in the middle of both.

Customization of columns in jenkins form for specific JOB

Is there any way in Jenkins where I can view customized data for a specific project. Like in the screenshot we can see columns (Salves, Online slaves, offline slaves etc.) Screen shot Example
View> Edit View> Portlets in the right column > Slaves statistics
I want to customize these columns for my project requirements like Build numbers, Revision numbers, svn changes (for every individual revision), the user (who submit this build) and Status. I knew we can see these changes individually from localhost:8080/jenkins/job/Job_name/224/ but I want to see whole information in one single form. I am good in Powershell but Java is not my cup of tea. Please help.
I don't think there is a plugin available to add custom columns, will require creating a custom plugin yourself. A plugin to add some pre-defined extra columns is available https://wiki.jenkins.io/display/JENKINS/Extra+Columns+Plugin
Alternatively, we added custom key value pairs in every build using currentBuild.description as shown here to be able to view in a single screen artifact name and environment for each build

This is about jenkins environment dashboard plugin.

I am using jenkins 1.532. I have installed Jenkins environment dashboard plugin. Created dashboard view, then I configured two of the deployment jobs to populate the dashboard with details. However, the dashboard is not displaying the details of the second deployment job. It always displays the details from first job. Has anyone tried using jenkins environment dashboard plugin with various environments and products.
I also tried to delete the dashboard view but Jenkins is not allowing the deletion also.
Can anyone help me as to why the dashboard is not picking details from second job and not allowing me to delete the dashboard view??
I had the same prob. After a bit of digging...
1) to edit (and delete! hurrah!) a Dashboard View just add a configure to the end of the URL to hit the config page
This...
http://myjenkins.local:8080/view/Dashboard1
Becomes this...
http://myjenkins.local:8080/view/Dashboard1/configure
2) the reason there were no left-hand view options in the first place
was because I'd ticked the following when setting up the View
Dashboard Portlets > Full screen view - hide standard Jenkins panels
So, edit the View as in (1) and uncheck that option to get your usual left-hand Jenkins View links back.

Is it possible to show all the submits from a Perforce depot without having to select a job?

We are currently attempting to setup an instance of Jenkins as our build system for our code base. We have multiple jobs setup (all using the same depot) to build different sections of the code.
We would now like to show the submits from all users pertaining to this depot on the main Jenkins screen rather than being able to view the change lists involved with a certain build (e.g. by selecting a certain job and then the link leading to the build information, etc...). I've looked into possible plugins and the closest one I was able to find was the "All Changes Plugin". This is exactly what we would like, but this is only visible when viewing the details of a build (e.g. which CLs were used to create the build), but would it be possible to show this type of information on the main Jenkins page instead?
Thank you in advance for your help.
You could write an extension for the Dashboard View plugin to provide a portlet containing an aggregated list of changes from perforce, though if you aren't experienced with writing plugins then you might be better off using a separate repository browser such as Fisheye or P4Web to display your changes.

Jenkins: Display last console output on project page

When viewing a project in Jenkins, I'd like to see the last console output displayed on the project page.
This satisfies two needs:
I most often just want to see what the output of the build was; clicking through to the last console output seems needlessly cumbersome
Non-technical management can't remember how to / aren't sufficiently motivated to click through to the last console output in cases where the output is relevant to them if only they were to easily see it
I've looked for plugins that support this but can't find any.
What options do I have?
First an easy solution: job descriptions (push 'edit description' button on the main job page) admit HREF links. Make that link your latest build console permalink (http://[jenkins_server]/job/[job-name]/lastBuild/console).
If even one click is too much, here's a possible solution: you can use log contents as the description of your job. You can update your job via Jenkins CLI with:
java -jar jenkins-cli.jar -s http://[jenkins-server] update-job [job-name] < config.xml
So what you need to do is this: after your jobs run, trigger another job that will take the triggering job and console output file as parameters, substitute <description> in the job's config.xml with the contents of the console file (with proper escaping, etc.), and run the update command as above. Of course, this solution is labor-intensive and bug-prone.
I had this same questions myself and I ended up finding this option useful...
http://[jenkins-server]/job/[job-name]/[build-number|lastBuild]/logText/progressiveText?start=0
Edit: This no longer works in the current version of Jenkins
Similar to malenkiy_scot's answer, you can actually embed iframes in the description.
I use:
<iframe src='lastBuild/consoleText' style='width: 80%; height: 500px'></iframe>
as my project description, and it shows the latest console text in the project description page.
I just created a plugin that displays console output of latest build at the project page.
https://github.com/jenkinsci/display-console-output-plugin
To use this plugin, you have to type mvn hpi:hpi to create a display-console-output.hpi file. Then upload this plugin from http://localhost:8080/pluginManager/advanced.
You can simply just use one of these plugins:
http://wiki.hudson-ci.org/display/HUDSON/Hudson+Personal+View
https://wiki.jenkins-ci.org/display/JENKINS/Console+Column+Plugin
May be you don't need it, you can click in the status button in the left of each build, each button show console output for each build.
Of course, this feature may not be operative in all Jenkins versions.
The solution for your problem is the https://wiki.jenkins-ci.org/display/JENKINS/Extra+Columns+Plugin plugin for Jenkins. After installing it you may modify your view to add a button for the console output as an additional column.
For a declarative pipeline, you can show a link to the console right where the progress bar shows up by adding this line at the very top of the file:
currentBuild.description = """Job console"""
This depends on a plugin and a setting, both of which were already on my system:
The OWASP Markup Formatter plugin provides the setting Security > Configure Global Security > Markup Formatter, which should be set to "Safe HTML".
The setting Jenkins -> Manage Jenkins -> Configure System -> Jenkins Location -> Jenkins URL needs to be the URL of your Jenkins installation.

Resources