简体   繁体   中英

Issue while triggering jenkins pipeline using github webhooks for specific branch

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM