I came across this setting for jenkins job to trigger jenkins when a new release tag is created on git repo like github but wondering what the equivalent is for groovy jobs DSL script.
Here is also link to same question asked but without the groovy job DSL script version jenkins trigger build if new tag is released
How can one know how to write groovy job DSL scripts based on jenkins job settings? I am yet to find a great documentation that explains the login when it comes to converting jenkins jobs to job DSL scriprs
Thanks
The built in Jenkins pipeline syntax tool should be able to help you create the script block for any of the plugins that you wish to use with the DSL. Any pipeline job will have a link for it on the left hand side.
This is roughly what it will look like after you enter in all your information (ie: repo location, branches, authentication). The part that you need is the refspec if you are on the syntax page it will be under the advanced button.