插件网站上的文档似乎有误:https://github.com/jenkinsci/gitlab-plugin
来自作业dsl文档的示例:https://jenkinsci.github.io/job-dsl-plugin/#method/javaposse.jobdsl.dsl.helpers.triggers.TriggerContext.gitlabPush
在GitLabPushTrigger
中,您可以设置secretToken
,但如何通过作业dsl进行设置?
我目前的工作:
job('seed-job-v2') {
description('Job that makes sure a service has a build pipeline available')
triggers {
gitlabPush {}
}
...
}
答案 0 :(得分:4)
答案 1 :(得分:0)
另一种选择
job('Test') {
triggers {
gitlabPush {
}
}
configure {
it / triggers / 'com.dabsquared.gitlabjenkins.GitLabPushTrigger' << secretToken('SECRET')
}
}