Develop/기타 작업
Jenkins Git Checkout timeout (pipeline script)
팡연
2022. 11. 1. 23:05
반응형
Jenknis 에서 Git Checkout 할 경우 파일 용량이 클 때 아래와 같이 기본으로 사용할 경우 10분이 넘어갈 경우 timeout 이 발생한다.
pipeline {
agent any
stages {
stage('checkout') {
steps {
git branch: 'master', credentialsId: 'credentialsId', url: 'git Repo URL"
}
}
}
}
이를 해결하기 위해 스크립트를 사용할 경우 아래와 같이 사용하여 timeout 시간을 늘려준다.
pipeline {
agent any
stages {
stage('checkout') {
steps {
checkout([
$class: "GitSCM",
branche: [[name: "master"]],
extensions: [
[$class: "CheckoutOption", timeout: 120],
[$class: "CloneOption", timeout: 120]
],
gitTool "Default",
userRemoteConfigs: [[credentialsId: "credentialsId", url: "git Repo URL"]]
])
}
}
}
}
반응형