我需要克隆一个插件 git 公共仓库(不是我的(,压缩它,然后将其上传到我的服务器。
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
}}