我需要将代码签出到$ GOPATH / src / dev-DIR文件夹中。但是由于 skipDefaultCheckout true 选项,checkout scm和其他阶段未执行。直接发布操作正在执行,请帮助我哪里出问题了?
pipeline {
agent {node {label 'project_a'}}
options {
skipDefaultCheckout true
}
environment {
PATH = "$PATH:/opt/jenkins/:/usr/local/go/bin/"
GIT_REPO = get_gitrepo()
GOPATH= "${env.WORKSPACE}"
PROJECT_WORKSPACE = "${env.WORKSPACE}/src/dev-DIR"
}
stages {
stage('checkout scm'){
steps{
dir ("${GOPATH}/src/dev-DIR"){
checkout scm
}
}
}
stage('Install Prerequisites') {
// go get -t
}
}
post{
//some actions
}
}
```