我需要克隆一个插件 git 公共(public)仓库(不是我的),压缩它,然后上传到我的服务器。
node {
stage('clone') { // for display purposes
// Get some code from a GitHub repository
git branch: 'master',
url: 'https://github.com/LimeSurvey/LimeSurvey.git'
}
}
那是我的代码,但是存储库很重,并且给了我 10 分钟的超时错误。我不知道它是否可以改变脚本的超时时间。
谢谢。
最佳答案
我终于可以做到了
这是我的代码:
node {
stage('clone') { // for display purposes
// Get some code from a GitHub repository
checkout([$class: 'GitSCM',
branches: [[name: '*/master']],
extensions: [[$class: 'CloneOption', timeout: 120]],
gitTool: 'Default',
userRemoteConfigs: [[url: 'https://github.com/LimeSurvey/LimeSurvey.git']]
])
}
stage('zip'){
zip zipFile: './publish.zip',
archive: true
}}
关于git - 使用经典 UI 在 Jenkins 管道上配置 git 超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49699379/