In my Jenkins Console logs it says:
Obtained jenkins/some.jenkinsfile from git ssh://mygitserver.myorg.com/my/git/repo.git
so I have to copy / paste / edit to get that repo then click about to the Jenkinsfile in your browser.
When you're doing this multiple times every day it becomes a major headache.
Is there anyway to get a simple clickable link?
I would suggest crafting an output that would then become clickable. i.e. declare the link then specify the file using a variable.
script { println("https://yourRepoUrl.com/jenkins/${downloadFile}) }
Alternatively, you could download the file from within the pipeline. See here for details
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.
There is a good plugin, emailext-template. Basically, I do not have the access to Jenkins-server. It is not convenient to choose the option mentioned in emailext to create the email template.
I dont know how to use this emailext-template plugin to get the template in jenkins-pipeline. There is no guideline in emailext-template. Any documents?
// expected usage in jenkins-pipeline
template_str = emailext-template('template-id')
This can be done in the following way, In case you can deploy jenkins again (if it is done on the cloud), you could create and deploy your email template as part of jenkins installation and configuration.
In case you did not have access to the jenkins server even while deployment, you can just form the html template with the corresponding variables and then use them in the job configuration itself.
The below image shows how the template files are used in jenkins, Instead of the script tag as in the image, you can replace with your own html content so that jenkins will be able to send email with that content.
Previously, I used testlink. This plugin generated a nice table with the test results in the build summary view.
Now, I don't use testlink anymore, so this plugin cannot be used. But instead, I want to feed a html report (which I take care of generating) to the build summary view.
I tried HTML Publisher Plugin, but it makes a link instead of displaying in the build summary view.
Is there such a plugin that allows me to specify that a certain .html file from the workspace will be included?
Bonus question: or even a plugin that allows a .html fragment to avoid the use of i-frames?
Try using the Summary Display Plugin. It work pretty good.
The configuration is a bit tricky so I'm adding an example screenshot of my configuration.
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.