Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't trigger builds triggered by the same event #172

Merged
merged 1 commit into from Sep 2, 2014

Conversation

Projects
None yet
4 participants
@rinrinne
Copy link
Member

commented Sep 1, 2014

Now any builds are triggered even if existing builds triggerd by the same
event are running.

This patch prevents to trigger build according to the below policy:

  • Project has triggered/running build triggered by the same event.
  • The event trigger builds has still running build.

This would fix JENKINS-24445.

Fix for JENKINS-24445

Task-Url: https://issues.jenkins-ci.org/browse/JENKINS-24445

Don't trigger builds triggered by the same event
Now any builds are triggered even if existing builds triggerd by the same
event are running.

This patch prevents to trigger build according to the below policy:

* Project has triggered/running build triggered by the same event.
* The event trigger builds has still running build.

This would fix JENKINS-24445.

Fix for JENKINS-24445

Task-Url: https://issues.jenkins-ci.org/browse/JENKINS-24445
@cloudbees-pull-request-builder

This comment has been minimized.

Copy link

commented Sep 1, 2014

plugins » gerrit-trigger-plugin #320 SUCCESS
This pull request looks good

@@ -835,6 +835,14 @@ private boolean isInteresting(GerritTriggeredEvent event) {
return false;
}

if (ToGerritRunListener.getInstance().isProjectTriggeredAndIncomplete(myProject, event)) {
logger.trace("Already triggered and imcompleted.");

This comment has been minimized.

Copy link
@rsandell

rsandell Sep 1, 2014

Member

I'm not sure this log message would make any sense without the event and project name.

This comment has been minimized.

Copy link
@rinrinne

rinrinne Sep 1, 2014

Author Member

In this plugin, it seems that logger.trace() is mainly used for simple method test. If so, it is certain that caller knows what is project and event well. So I think it is no problem even if those are not displayed at this location.

If needed, I will rewrite whole trace code using ENTER-LEAVE style.

@jenkinsadmin

This comment has been minimized.

Copy link
Member

commented Sep 1, 2014

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

@rsandell

This comment has been minimized.

Copy link
Member

commented Sep 1, 2014

Yes, you're right. lets leave the trace as is.

rsandell added a commit that referenced this pull request Sep 2, 2014

Merge pull request #172 from rinrinne/running-trigger
Don't trigger builds triggered by the same event

@rsandell rsandell merged commit 96802e0 into jenkinsci:master Sep 2, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.