Jenkins Promoted Builds -- promotion UI missing? - jenkins

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).

Related

Build trigger don't get saved in Jenkins

We have a nighly build that triggers build of many different projects to verify external testing like contracts and such to avoid triggering such tests on every checkin.
However lately we have encountered a problem, if you open a build configuration and enter any parameter or build triggers and then saves the configuration. Once you save it gives no indication as to an error or anything but if you open it again its not there, no build trigger or parameter gets saved.
We have managed to isolate it to pipeline build, freestyle builds still works.
We installed Blue Ocean recently and are not wondering if it somehow changes how a pipeline job definition is saved. It seems a bad decision if Blue ocean hinders such a basic setting but still. We haven't been able to create a pipeline job throught blue ocean either since our job isn't triggered by any SCM and blue ocean requires that.

Trigger a downstream project on demand

Given the following situation
main-job builds and tests a project
installer-job copies artifacts from main-job, and packages them into an installer
installer-job is set as downstream project of main-job via Parameterized Trigger Plugin.
But the installer-job should only be triggered on-demand from main-job's build page.
It's possible to trigger the downstream job on the project page:
But it doesn't seem possible to trigger the build from a specific build page.
Is there any option to get such a trigger button on the build page?
Note: It's a freestyle project, not a pipeline one. So things like the Build Pipeline plugin don't help, unfortunately.
An elegant solution is possible via the Promoted Builds Plugin. "Promotion" is some activity that's performed when a build fulfills certain criteria, like
build was successful
all downstream builds passed
explicit, interactive confirmation
In your case, this condition will be simple: just "main-job" needs be successful, and you will want to confirm explicitly.
There's lots of possible steps that can be triggered as promotion activity -- what you want is to trigger a build of the "installer-job", which can be configured easily.
To summarize, for "main-job", you will configure something like this:
When you do that, the 'main-job" builds will feature a "Promotion Status" button. After pressing the "Approve" button there, the promotion will be enabled and the "install-job" will start building:

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:

Build every branch but only those newly pushed to

I want to have Jenkins CI test every branch but not all existing one, solely the ones which received a recent push.
I have set up a GitHub web hook which triggers new builds. This works fine for the branch specifier set to master. Now I tried ** so every branch is built.
The problem: on the first push it tries to build every branch, which is simply too much and would take ages. Is there a way to limit this?
There is no configuration which supports the feature you are requested and since it looks like there is no plugin yet. Your best shot would be to implement your own plugin that can specify a certain date threshold for branches.
Having said that, to solve your problem I would simply:
Empty the shell script for your job
Trigger a new build
Set your shell script again
This way all remote branches get checked out, run and marked as successful within no time due to the empty shell script. After re-enabling your actual shell script you are good to go.

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