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

Not compatible with the "Trigger builds remotely" configuration option #290

Closed
raychinov opened this issue Jan 11, 2024 · 2 comments
Closed

Comments

@raychinov
Copy link

  • Jenkins 2.332.3
  • Generic Webhook Trigger Version 1.85.2

When I enable Trigger builds remotely (e.g., from scripts) configuration in a Pipeline Jenkins job, Jenkins responses with HTTP 404 and:

{"jobs":null,"message":"Did not find any jobs with GenericTrigger configured! If you are using a token, you need to pass it like ...trigger/invoke?token=TOKENHERE. If you are not using a token, you need to authenticate like http://user:passsword@example.org/generic-webhook... "}

With no other changes, when disable the Trigger builds remotely config, the webhook trigger works as expected.

@tomasbjerre
Copy link
Contributor

Here is the logic:

return genericTokenNotConfigured && authenticationTokenMatches(authToken, givenToken)

So if you leave the token-field empty in the plugin configuration, and keep a token-value in Trigger builds remotely, it should work if you supply the token-value from Trigger builds remotely.

The first version of this plugin did not have its own token-field. It was added in #63 in 2018, perhaps it is time to simplify this code and just rely on the token-field from this plugin.

@tomasbjerre
Copy link
Contributor

Support for BuildAuthorizationToken is dropped now in 2.0.0. The token used by this plugin now must be configured in the plugin config.

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