There are five jobs in sequential order(1,2,3,4,5). Jobs 2,3,4,5 are built successfully(but they have not come out of the execution shell), since the job 1 is still compiling. If I abort job 1 then all the results of 2,3,4,5 are updated spontaneously to gerrit.
How can I change this configuration in Jenkins master?
This is a known bug in the Jenkins mailer plugin, you need to upgrade the plugin to the latest version.
Here you can find more details:
Github - [FIXED JENKINS-20867] Never wait for a prior build to
complete merely
Jenkins - Sending mail blocks on prior build
Related
Jenkins Version: 2.73.1
Gerrit-Trigger plug-in version: 2.27.1
Gerrit Version: 2.14.2
my scenario here is:
New patch set triggers job 1, job1 posts a message (build first) to that patch set, then job2 should be triggered by that comment, but job2 is not triggered for some reason. Below is the configuration of job 1 and job 2
Job 1 Configuration in Gerrit events:
Job 2 Configuration in Gerrit Trigger >> Trigger on
After job 1 executed successfully, this should send a custom message (build first) to patch set and job 2 should trigger based on the message.
Job 2 is not triggering in this case. Don't know what wrong here.
This is not a complete solution as I believe there may be another way to reproduce the issue but we discovered that we can reproduce this issue if we enable the 3 checkboxes:
Build Current Patches Only
Abort new patch sets
Abort manual patch sets
By disabling these settings Jenkins will no longer abort old job builds if a newer patch is available but it will allow Gerrit Trigger to respond to it's own Gerrit Comments thus triggering additional builds.
We have another system we deployed that experiences this issue but even disabling those 3 checkboxes did not resolve it for that system. I feel like certain settings configurations may cause Gerrit Trigger to ignore it's own comments thus not allowing you to create a job that triggers another job by modifying the success/fail messages of the first job.
I ran into this issue recently with Jenkins 2.235.1 talking to gerrit 2.16.9
I found an option in Jenkins
Jenkins->Manage Jenkins->Gerrit Trigger
Edit Gerrit Instance
Click Advanced
Ensure "Trigger on all comments, even default users" is enabled
Not sure if this was added to address the issue documented here or not but it fixed my issue after enabling this and rebooting jenkins.
There are two jobs in my jenkins server
job1 : build every 10 minutes to scan the events, if happens it triggers the downstream job2
job2 : normal job mostly run once in the case.
Problem:
too many useless jenkins build for job1 in the UI since it runs frequently.
It will be good if the build can be discarded if it doesn't trigger the downstream job.
Solution so far:, using Discard Old build plugin in post build action is one direction, but no clue how to get it works nicely.
With the hints from #JamesD's comments, I can use several plugins to achieve this
Archive artifacts Plugin: to archive the param.txt files which is used to path to downstream jobs
Groovy Postbuild job Plugin: add the groovy script to check whether the param.txt exists or not. The build will be set to Abort if it doesn't exists
Discard Old Builds Plugin: will discard the Abort build
I have a Jenkins server with half a dozen builds. Each of these builds is composed of a parent job that triggers anywhere between 4 and 6 smaller jobs that run in parallel. I use the EC2 plugin to keep the number of active slaves in line with the number of queued builds. Or in other words, slaves are coming and going all the time. Each slave has 7 executors (parent job + max(4, 6)).
It is absolutely crucial that all jobs of a build are executed on the same machine. I also cannot allow any jobs from build A to execute on a machine that has jobs from build B running.
What I'm looking for is a way that prevents Jenkins from using any inactive executors of a node as long as any jobs from a previous build are still active on it.
I've spent the day experimenting with a combination of the Throttle Concurrent Builds Plugin and the NodeLabel Parameter Plugin. Unfortunately, there seems to be a bug somewhere that causes throttled builds to not contribute to the Load Statistics of a slave. This in turn means that throttled build will never trigger Jenkins to spin up additional slaves. Obviously this is totally unacceptable.
You can try and use "This build is parameterized"
and pass the $NODE_NAME as a parameter between the builds and then use it at the "Restrict where this project can be run"
I have a large multi-module maven project, which is handled by a number of jobs in jenkins.
I have noticed that not all downstream jobs are trggered when an upstream job finishes successfully. The upstream and downstream jobs are calcualated automatically by Jenkins. Sometimes a subset of the jobs are triggered, and sometimes none. This puzzles me, any good explanations out there ?
In the category better late than never:
There was a bug in the maven job code which would ignore triggers if upstream dependencies were still building :
see https://issues.jenkins-ci.org/browse/JENKINS-21903
this was fixed end september 2014, so any relatively recent version should no longer be affected by this.
I am creating a build that has 3 (sub builds) using the Parameterized Trigger Plugin to fire the builds I need built in a specific order.
The main build is using the Jenkins GIT plugin to monitor the repos I need so it can be triggered by a push to the branch I've declared.
The thing is, when I create the build at first (This is done through autojenkins) and trigger it to build, it builds but then in the middle of the first build a second build is scheduled and in the middle of the seconds build a third build is then scheduled, effectively building the same project 3 times in a row, although there has been no changes to the repos.
The reasons for build 2 and 3 are the same: Started by an SCM change but there is nothing to see in the polling log.
Can this behaviour be explained somehow?
Any help is greatly appreciated!
Here's some info on Jenkins:
Jenkins v 1.529 running on Ubuntu 12.04 on Amazon
Jenkins GIT plugin v 1.5.0
Parameterized Trigger Plugin v 2.20