Stop Jenkins checking out Git URL in a Pipeline stage

前端 未结 1 862
无人共我
无人共我 2021-01-13 11:51

I have setup a Jenkins Declarative Pipeline job, and it pulls the Jenkinsfile from Git. I have a stage that is running on a another node (selected by a label), but it is try

相关标签:
1条回答
  • 2021-01-13 12:18

    You can use the skipDefaultCheckout() in the options block. This will disable the checkout of the SCM on any node in any stage, so you will have to do a checkout scm step in the other stages manually.

    pipeline {
        agent any
        options { skipDefaultCheckout() }
        stages{
            stage('first stage') {
                steps {
                    checkout scm   
                }
            }
        }
    }
    
    0 讨论(0)
提交回复
热议问题