Jenkins GitHub org last build status icon - jenkins

I have Jenkins configured such that it scanned my entire organization and created jobs for every repo that had a PR with a Jenkinsfile. This worked fine and I'm getting the builds running.
My problem is these repo icons on the left column:
These are supposed to be "status of last build" icons. Is there any way to change this? This is really not useful as I need to click into each job to see what the last status was.

Related

Gitea Jenkins plugin: discovering branches to build

Gitea recommends a separate Gitea Plugin for Jenkins. I'm puzzled why two identical builds are triggered when a PR is created.
I'm trying to achieve the following:
Without a PR, a push to a branch should NOT trigger a build
Every time a PR is requested in Gitea, a build is triggered for the PR.
If a new revision pushed to the branch for which a PR is created, another check build should be triggered
It's kinda working... But for some reasons two builds are created. Could someone please explain, what are these pipeline/head and pipeline/pr-master builds, and why there are two of them?
Here is the relevant part of my Jenkins configuration. I understand that this selection is a "legacy" one, however it's the only one that allows me to build only on PR. If I select the "recommended" one, then every push triggers a build, which is not what I want.
Thanks!
Answering my own question. Awwww what a silly sausage I am. The only thing that needed to be done was removing the "Discover branches" behaviour. And, naturally, it stops discovering "just branches" :) For some reasons I did not realise I can remove the default behaviours.

How to get branch specific build status with embeddable build status plugin in Jenkins

I am using the "Embeddable build status" plugin for Jenkins.
I cannot get the build status of a specific branch working, it always shows "not run" status.
I am using the unprotected link:
[![Build Status](http://ec2-34-251-244-92.eu-west-1.compute.amazonaws.com/jenkins/buildStatus/icon?job=vuffeli_api)](http://ec2-34-251-244-92.eu-west-1.compute.amazonaws.com/jenkins/job/vuffeli_api/)
I have given Anonymous viewstatus permissions on jobs globally.
This works fine but as soon as I add the branch information it stops working.
I have tried the following combinations and am at a loss.
http://ec2-34-251-244-92.eu-west-1.compute.amazonaws.com/jenkins/buildStatus/icon?job=vuffeli_api%2Fmaster)
http://ec2-34-251-244-92.eu-west-1.compute.amazonaws.com/jenkins/buildStatus/icon?job=vuffeli_api%252Fmaster
http://ec2-34-251-244-92.eu-west-1.compute.amazonaws.com/jenkins/buildStatus/icon?job=vuffeli_api%2Forigin%252Fmaster
http://ec2-34-251-244-92.eu-west-1.compute.amazonaws.com/jenkins/buildStatus/icon?job=vuffeli_api%2Fvuffeli_api%252Fmaster
I was expecting the badge to show the status of the master branch but it is grey and displays "not run"
EDIT 27-05-2019
A temporary solution has been to have multiple projects in jenkins that filter what branches trigger builds and then show a status for projects that only build and test specific branches.
I have not found a better solution than to have statuses displayed for all relevant branches and I have since stopped using jenkins and started using Azure pipelines instead.
If any of you find a solution please submit the answer but for now I will consider this closed.
You need to make sure that you have BRANCH Parameter for this job and then:
http://ec2-34-251-244-92.eu-west-1.compute.amazonaws.com/job/vuffeli_api/badge/icon?build=firstSuccessful:${params.BRANCH=master}
(worked for me)
Note that this feature is supported since v2.0:
https://github.com/jenkinsci/embeddable-build-status-plugin/issues/27

Jenkins Pipeline Builds: Viewing Workspace in the UI

We are now experimenting with multi-branch Pipeline builds. The main advantage of the feature is that it allows us to automatically create new Jenkins jobs whenever a new branch is created.
However, it also is a bit more difficult to implement than the old way of selecting how to do the build using the UI. Plus, certain features seem to be missing.
For example, in Jenkins Freestyle jobs, we are able to use the Jenkins UI to browse through the workspace, download individual files, and even wipe out the workspace. We found this helpful when builds went awry or if the developer needed a particular built asset that wasn't archived.
I've noticed in the Jenkins Pipeline jobs the UI no longer offers access to the workspace. I know I can archive the workspace, but I really don't want to save it -- especially for each and every build. I simply want to be able to browse the workspace or clean it out if something is causing problems with the build process.
Is there a way to get back this feature via the pipeline? I don't want to archive the workspace for each build (space issues), but I do want to be able to see what the workspace looks like if there are problems.
Freestyle Job with Workspace UI
Pipeline Job. No ability to browse Workspace
You can see your work space in three simple steps:
First, go to the build run you are interested in and click “pipeline steps”.
Then click “allocate node: start”. If you have multiple nodes, you’ll need to do this more than once.
Then you click the workspace link. (it appears on the left pane).
You can also click on Build Artifacts on build page:

Jenkins Promoted Builds -- promotion UI missing?

I have set up an awesome Jenkins server and am now trying out the Promoted Builds plugin, but am having trouble getting it to do anything. I want to set up manual promotion so that I can click a button and copy the artifacts (using the Copy Artifacts plugin) to another server. My promote config looks like:
And when I click promote on a build, I get:
...which is not so useful. There doesn't seem to be a "do stuff!" button.
It seems like it should look more like this:
...but it doesn't. What have I got wrong?
I got the same problem and I noticed that if a build was run when the job didn't have any promotion set up, then the result is what you have. Try to re-run the job now, after setting the promotions and it will be enabled (at least it did for me).

No build listed after changing jenkins job name

I changed a job by changing the job name and adding some batch file commands(only some copy paste and db connections:none messing up with jenkins). It displays no build at first go which is expected, but now when i trigger a build, after getting finished it disappears.
Checked with the files and job builds in jenkins war location but can find all the builds there. But none is displayed in Jenkins UI.
Any specific reason?
Would add snapshots if required (Hope i am clear with my ques)
You have to go to Edit View and add that particular job to its corresponding view section,hope it will reappear the job in the jenkins UI.
Thanks
Restarting the jenkins resolved this. Need to look at any possible solution without restarting. Marking this as resolved since the issue is no more present.

Resources