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

Condition doesn't correct for option allowSeveralTriggersPerBuild #255

Closed
linuxoid69 opened this issue Jan 17, 2023 · 1 comment
Closed

Comments

@linuxoid69
Copy link

When reporting a bug, please try to provide as much information as possible.

  • Plugin version used 1.86.2
  • Jenkins version used. Jenkins 2.375.2
  • Your configuration.
    • Variables configured, names, expressions...
    • Pipeline script (See Pipeline section in README)
  • Build job log
  • Post content received. It can be found in the job execution log. People using GitHub often forget to set the content type in "Manage webhook" when configuring the webhook at GitHub.
  • A curl command and its response.
  • Expected result and actual result.

You may also have a look at the test cases as they should answer the most common questions:

https://github.com/jenkinsci/generic-webhook-trigger-plugin/tree/master/src/test/resources/org/jenkinsci/plugins/gwt/bdd

If you are fiddling with expressions, you may want to checkout:

A Curl command can look something like this:

curl -v -H "Content-Type: application/json" -X POST -d '{ "app":{ "name":"GitHub API", "url":"http://developer.github.com/v3/oauth/" }}' http://localhost:8080/jenkins/generic-webhook-trigger/invoke?token=sometoken

I suppose that line contains not correct condition.

final boolean triggerOneBuildPerInvocation = !allowSeveralTriggersPerBuild;

Correct as
final boolean triggerOneBuildPerInvocation = allowSeveralTriggersPerBuild;

@tomasbjerre
Copy link
Contributor

One trigger means one invocation, one call to /generic-webhook-trigger/invoke. The intention is to let each individual invocation trigger exactly one build. Should solve these issues where several triggers has been triggering same build: #64 #116 #126 #162 #171 #252

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants