共享库中的Jenkinsfile指令

时间:2017-09-21 13:25:48

标签: jenkins jenkins-pipeline

是否可以使用全局共享库替换我在声明性管道中遇到的重复optionstriggers

   pipeline {
        agent any

        options {
            gitLabConnection('GitLab')
            gitlabCommitStatus(name: 'commitit')
        }
        triggers {
            gitlab(triggerOnPush: true, triggerOnMergeRequest: true, 
            branchFilterType: 'All')
            pollSCM('H/30 * * * *')
        }
}

pipeline {
    agent any

    gitLabConf {}
}

0 个答案:

没有答案