[英]How to disable lightweight checkout on jenkins pipeline script?
據我了解,Jenkins 上默認啟用Lightweight Checkout
。 有人知道如何禁用它嗎?
如何找到下面的信息片段”
About Multibranch Pipeline support
Multibranch Pipelines support lightweight checkout since JENKINS-33273.
It is activated by default.
There is a kill switch to deactivate it.
Simply add org.jenkinsci.plugins.workflow.multibranch.USE_HEAVYWEIGHT_CHECKOUT=true to Jenkins arguments
但我不知道如何添加到詹金斯。
Cloudbees 解決了JENKINS-33273 - 優化 Jenkinsfile 加載和分支檢測,它引入/改變了行為。
他們的博客有一篇文章, 為什么我的多分支項目要在 master 上克隆整個存儲庫? 以及如何向 Jenkins 添加 Java 參數的鏈接? .
另請參閱由系統屬性控制的 Jenkins 功能。 本質上,它是啟動 Jenkins 本身的參數中的一個參數。 確保它是JENKINS_ARGS
而不是JAVA_OPTIONS
。
JENKINS-45686開放以提供 UI 選項來管理此配置或其他方式。
其他管道信息: Jenkins 中的多分支工作流的管道即代碼
pipelineJob("pipeline with branch parameter") {
stringParam {
name('BRANCH')
defaultValue('master')
description('Branch name')
trim(true)
}
}
definition {
cpsScm {
scm {
git {
remote {
github("username/myrepo", "https")
credentials("jenkins-gh")
}
branch("*/\${BRANCH}")
}
}
scriptPath("jenkins/file/path")
lightweight(lightweight=false)
}
}
disabled(false)
}
更多選擇: 這里
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.