We have provided access to users to abort the running jobs. But, before aborting a job it should prompt and record some additional information from user. To track why they are aborting a build.
Do we have any plugins to do this ?
Thanks,
Ras Dama.
I was searching for the same option but found currently it is not available.
Require user to enter reason for manual build abortion
Above link is the feature request submitted already to Jenkins but it is still in Open state.
So suggestion is, if you go the page for a particular build, you can click "Edit build information" and add comments for the build. This is what i do.
Related
After some unluckily research, I would like to ask here if there is any mean to do a simpe "end of build" acknowledgement apart from emailing on jenkins.
Some tiers application needs to know if a jenkins build run is finished before this one allow another action to be operated.
The restriction is that I do not have any rights to install some http plugin which for instance could allow to notify a webservice (which would have been a fit solution..... ).
Thank you in advance for your help.
I have set up a way for my team to click on some links to trigger some jenkins jobs. For this I have used the "Trigger builds remotely (e.g., from scripts)" option
I need to send an email after that detailing who triggered the job, but I have noticed that triggering this way the cause gets registered as Cause.RemoteCause instead of Cause.UserIdCause. This does not have info on the user who triggered it, even though they need to log in.
I have not been able to find any other way of getting the user's name. Is it even possible with remotely triggered builds? If so, how would I do it?
Thank you in advance
I did a little search and googling for this issue, but most of the posts are related on how to isolate (by using git plugin etc.)
What I'm wondering is there a way to configure a jenkins job to trigger a build on specific commit message (let's say if it contains "build") on the branch I specified.
Thanks in advance,
You can use Commit Message Trigger Plugin to achieve this.
Once you install this plugin, go to your job configuration page and under Build Environment section check Enable Commit Message Trigger,then add the keyword that will cause the job to trigger.
The answers by #ANIL is totally correct just a few improvement to make thinks clear.
if you put the keyword as admin as shown in image then in your commit message you must
have "ci admin" included and it works. It didn't work without adding ci ahead of keywords in my commit message for me.
We don't have to add ci in keywords in the build environment setting.
We are using Jenkins with Pipeline Jobs and of course the awesome Jenkinsfile.
Twice now a developer accidentally clicked on the build button, which ended up causing a bit of chaos. I am trying to figure out if it is possible to have something like a popup that asks "Do you really want to start this build?".
Any ideas on this user related issue are welcome.
Have a look at the article Controlling the Flow with Stage, Lock, and Milestone in the Jenkins blog, which covers a bit more than only asking for confirmation.
Essentially, there is the input step, which requires user input to continue pipeline execution.
The problem with the input step as suggested by StephenKing is that you won't be able to run the build automatically anymore as it will always ask for the user to confirm the input step manually. This prevents "automatic builds" triggered e.g. by webhooks or CRON jobs.
One workaround is to have a timeout and the build is triggered if the timeout is over. Like that, a user can at least abort an unintended build. But this leads to significantly longer build times.
What we did in my old company was, that we created a so called "parametrized" build, which had a simple checkbox "Do you really want to build this job" that resulted in a flag REALLY_BUILD as an environment variable. You can then ask for ${REALLY_BUILD}==1 in the Jenkinsfile. Every time a developer triggers a build, he has to check the box, otherwise the build will not start / immediately stop.
When you trigger your job via a webhook, you can pass a parameter REALLY_BUILD as an URL parameter (see this comment in the Jenkins tracker) and access it in the Jenkinsfile as before.
Here is another resource for how to use parameters in Pipelines.
I was able to create the new job but I am NOT able to add any build step.
This behaviour is reproducible and it occurs when I try to do it from the initial “configure” page I get after job creation as well as with a later configure attempt. And its persists for all job types.
It does not depend on whether I am logged in or not.
The problem is that when I open the “add build step” I get a selection of possible job types (“shell script”, “windows batch”, …) but when I select one of those nothing more happens.
I also have other jobs of this type already up and running and I am also not able to add more build steps to those.
I had this with v1.625.3, all of a sudden. Problem in Chrome and FF. Workaround was to use IE.