jenkinsci / generic-webhook-trigger-plugin

Can receive any HTTP request, extract any values from JSON or XML and trigger a job with those values available as variables. Works with GitHub, GitLab, Bitbucket, Jira and many more.
https://plugins.jenkins.io/generic-webhook-trigger
410 stars 161 forks source link

Usage of multibranch pipeline in conjuntion with generic webhook trigger #212

Closed kalidina closed 3 years ago

kalidina commented 3 years ago

Jenkins version : 2.235.1-alpine Plugin version : 1.74

Problem Description : I am not able to use generic webhook trigger from a multibranch pipeline in github.

Reproduction steps

Results

For multibranch pipeline implemented with generic webhook triggers, not sure if the suggestion is to configure both webhooks (multibranch, generic-webhook) on the repo. Please suggest. Not able to get the pipeline to parse generic trigger variables with just the multibranch webhook configured on the repo. For a simple/non-multibranch pipeline, configuring just the generic-webhook on repo works fine. But for a multi-branch pipeline, how should the webhook configuration look like ? to make use of functionalities of both plugins.

tomasbjerre commented 3 years ago

Last time I checked the "Multibranch Scan Webhook Trigger" just triggers the scanning of multibranch. It does not trigger any jobs.

This plugin triggers jobs.

If you want to trigger jobs and contribute content from webhook, you need this plugin configured in repo.

dkoerner85 commented 3 years ago

Scanning a multibranch-pipeline in Jenkins will trigger jobs if new commits are found for the respective branches. This behaviour can be disabled by adding the property Suppress automatic SCM triggering to the branch source.

So, the https://plugins.jenkins.io/multibranch-scan-webhook-trigger will not trigger jobs by itself, but as a consequence of triggering the scan.