是否可以使用全局共享库替换我在声明性管道中遇到的重复options
和triggers
?
pipeline {
agent any
options {
gitLabConnection('GitLab')
gitlabCommitStatus(name: 'commitit')
}
triggers {
gitlab(triggerOnPush: true, triggerOnMergeRequest: true,
branchFilterType: 'All')
pollSCM('H/30 * * * *')
}
}
到
pipeline {
agent any
gitLabConf {}
}