簡體   English   中英

想知道 PollSCM 如何選擇要在 Jenkins Pipeline 中輪詢的 repo

[英]Want to know how PollSCM pick the repo to poll in Jenkins Pipeline

作業似乎沒有被 GIT 提交觸發,Pollscm 會在下面的“Pull src”階段選擇回購嗎? 或者請讓我知道如何將 repo 傳遞給 PollSCM,以便在 git repo 提交更改后觸發構建?

 node( ) {
        properties([ 
            buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '40')),
            disableConcurrentBuilds(), 
            parameters([
                string(defaultValue: '', description: '', name: 'BRANCH', trim: false), 
                ]), 
            pipelineTriggers([pollSCM('H/10 * * * *')])
        ])
        stage('Clean Workspace') {
            cleanWs deleteDirs: true
        }
        stage('Pull src') {
            git branch: env.BRANCH, credentialsId: 'git', url: 'git@github.com:something/something'
        }
        stage('Pack'){
}
}

PollSCM 自動選擇“Pull src”階段的回購,我的 GIT 憑據在更正后遇到問題,上述工作運行良好,按規定定期輪詢並在提交時運行構建。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM