1

Trying to trigger Jenkins pipeline using Github webhooks for a specific branch. Pipeline should trigger for a merge commit but having an issue in triggering. Tried it using 'Generic Webhook Trigger' plugin.

If I use ^(refs/heads/release-1.0)$ in optional filters and pipeline is triggering whenever something is merged into release-1.0 branch and pipeline build is successful

But when i used ^(refs/heads/release-)$ in optional filters, the pipeline is not triggering. Here why I am using release- is release branches have tag numbers. For example: release-1.0, release-1.1, release-1.2 and so on.

Can anyone help me with this question.

1 Answers1

1

This ^(refs/heads/release-)$ is a regexp, starting (^) with, end ending ($), enclosing specifc text refs/heads/release- .

You need to extend the regexp pattern match, eg: .* or [0-9]*\.[0-9]*, here: release-{here}

From README.md,

This regexp site Also syntax here

Ian W
  • 4,559
  • 2
  • 18
  • 37