mgriffin gitlabPush trigger exists for backwards compatibility.
Job DSL will not provide built-in support for every config option of all of the 1000+ Jenkins plugins. It's not possible to keep up with the changes in all plugins. The configure block has been available since v1.0 to allow generating arbitrary config options that are not available in the built-in DSL. The Automatically Generated DSL has been added to provide an alternative to configure blocks with a nicer syntax. But plugins have to provide the runtime metadata to be able to generate the syntax at runtime.
In case of the GitLab plugin, the provided metadata is not correct. The plugin has marked all options as required (@DataBoundConstructor vs @DataBoundSetter). That should be fixed in the GitLab plugin. So please report an issue for that plugin and link to this issue.
The following snippet shows how to use a configure block to add the option.
job('example') {
triggers {
gitlabPush {
}
}
configure {
it / triggers / 'com.dabsquared.gitlabjenkins.GitLabPushTrigger' << secretToken('SECRET')
}
}
Looks like a Job DSL issue, not a GitLab Plugin issue.