Jenkins Build Pipeline Plugin - Blank White modal window - no parameter prompt issue on first job - jenkins

Jenkins 1.573 / 1.628 or latest version.
Build Pipeline plugin : 1.4.8 (latest)
Till last week everything was OK, today I'm seeing that when I click on the first job in the Build Pipeline dashboard view (to run a process), it used to prompt parameters but not anymore. It's giving me a BLANK white modal window / popup page and there are no input parameters visible.
Any idea! what I may be missing.
http://s000.tinyupload.com/download.php?file_id=03793493629898722609&t=0379349362989872260930671

I had a similar issue, but solution was different. In my Jenkins configuration, the Jenkins URL was not set correctly - it was a http address, whereas my Jenkins was set up with TLS. So make sure that Manage Jenkins - Configure System - Jenkins URL is set correctly.

Finally found the issue.
The issue is either with the Build Pipeline plugin (not using / compatible with Chrome browser) OR it's a Chrome browser issue.
I somehow had Chrome session opened the other day and when I click on "Run" (top section) to start the pipeline / job run, it shows me a BLANK modal window and doesn't show me any parameters.
Version 46.0.2490.86 m
Google Chrome is up to date.
While the same is working in IE or Firefox (I have the latest versions). I guess, I'll use FF/IE for now.

Related

Jenkins NodeLabelParameter Plugin not displaying

I installed the NodeLabelParameter Plugin to allow me to set a node to use for a build, but when selecting Node or Label parameter types the parameter box isn't appended to the list of parameters. I can see the render request in network tab with the expected html. No errors in console.
I have tried uninstalling and reinstalling the Plugin, removed other Plugins to see if there was any conflicts but nothing seems to work.
Has anyone ever had this issue before and might be able to advise?
I am running Jenkins 1.264.3 and NodeLabelParameter (1.7.2)
After some serious debugging, I found the last script to run before Jenkins getting the render file was Adguard. This seemed to have been the issue, disabled Adguard and next click of adding the parameter it appeared.

Direct url to the lastest details page of a build

I try to set up a public display on our department floor to present the current status of the Jenkin's maintained projects. Therefore I'm cycling through a session of Jenkins web pages like the Blue Ocean Pipeline overview or the detailed build history of particular pipelines.
Blue Ocean Pipeline Build History
Additionally I would like to show the detailed page of the last build step of a pipeline.
Build details of a pipeline
Unfortunately the url that is been called uses the build number which I don't have on my script side. Is there a way within Blue Ocean to call for the last detailed build page in depended of the build number.
* instead of .../blue/organizations/jenkins/Playground_RTM/detail/Playground_RTM/112/pipeline
* something like that .../blue/organizations/jenkins/Playground_RTM/detail/Playground_RTM/last/pipeline
Any ideas?
I could not find a direct dynamic URL in the blue ocean for the last build.
If somebody is looking for providing a quick access link, they could provide link to activity page for a particular branch in blue ocean.
https://<host-name>/blue/organizations/jenkins/<job-name>/activity?branch=<branch-name>
Or provide the last build page URL for classic Jenkins by using the lastBuild keyword.

How do I fix a Jenkins HTML report "checksum mismatch"?

I got a brand new Jenkins machine running on Linux Ubuntu. I use HTML Publisher Plugin to publish my html reports. I also use Jsystem to invoke the test scenario.
Jenkins 1.643
Html Publisher Plugin 1.10
At the end of the test when open the latest html report from the project main page I get this error:
Checksum mismatch
The checksum of the current wrapper file (0dd0c5ec07dff1d7179f03b5deb290e96ac68f8c) does not match the recorded checksum (090f21ac5f8c4b0eed9e789145a2fe2a6134c900). This indicates a possible security issue, therefore Jenkins will not serve this file. You can access the archived HTML files here.
I have checked existence of file and permissions. If I open the report from the job page then everything works.
UPDATE:
When I open the report from the job page I have no CSS and many errors.
Looks like a security issue.
UPDATE 2:
CSS and Javascript are back, Jenkins had an update on their Content Security Policy. Added args to the Jenkins startup scripts. First issue is still on. :(
It is a bug in that version of the HTML publisher plug in. The bug happens if you have more than one report in your job, mark the publishing option: 'Keep past HTML reports' and then click on the second report.
https://issues.jenkins-ci.org/browse/JENKINS-32281
Solution in https://jenkins.ci.cloudbees.com/job/plugins/job/htmlpublisher-plugin/61/.
Solution is released as 1.11 of the plug in.
it worked for me: Blocked script execution in <URL>. because the document's frame is sandboxed and the 'allow-scripts' permission is not set
System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "")

My Jenkins confluence publishing plugin does not work

I have a little issue with my development infrastructure. I have a Jenkins CI and I would like to use the Jenkins Confluence publishing plugin to publish the artifacts on a wiki page. I have followed all the steps within the plugin home page but it does not work.
All configuration have been verified (credentials, etc.)...but still, it does not work. Jenkins even check automatically if the credentials provided are correct and if it can access the target confluence page.
instead, after the build I have the following error :
BUILD SUCCESSFUL
Total time: 15 seconds
Archiving artifacts
[confluence] Unable to locate page: ARTIFACT/App+Artifact+Page.
[confluence] Check that the page still exists. If the Space and/or Page name contain build-time parameters, check that the parameter(s) are set to the proper value(s).
Finished: SUCCESS
ARTIFACT is the space name and App Artifact Page the page name.
Any help would be appreciated
Thanks in advance
The problem is with those pluses in page name. So when your page name is Page Names With Pluses then url in the web browser shows:
http://confluence.example.com/display/Space/Page+Names+With+Pluses
Don't put those pluses in Jenkins' configuration but put Page Names With Pluses and it'll work.

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