git fetch 不支持超时时间, 如果你需要复杂的git 配置,请使用 checkout。 参考 https://www.jenkins.io/doc/pipeline/steps/git/
maven 缓存,请参考 https://docs.kubesphere.com.cn/v4.1.1/11-use-extensions/01-devops/03-how-to-use/05-devops-settings/04-set-ci-node/ 设置ci node。 其原理是使用节点上的hostpath 缓存目录:
root@i-7jumnupo:/var/data# ls
jenkins_go_cache jenkins_maven_cache jenkins_nodejs_npm_cache jenkins_nodejs_yarn_cache jenkins_sonar_cache
root@i-7jumnupo:~# kubectl -n kubesphere-devops-system get cm jenkins-casc-config -o yaml | grep "/var/data"
hostPath: "/var/data/jenkins_sonar_cache"
hostPath: "/var/data/jenkins_nodejs_yarn_cache"
hostPath: "/var/data/jenkins_nodejs_npm_cache"
hostPath: "/var/data/jenkins_sonar_cache"
hostPath: "/var/data/jenkins_maven_cache"
hostPath: "/var/data/jenkins_sonar_cache"
hostPath: "/var/data/jenkins_go_cache"
hostPath: "/var/data/jenkins_sonar_cache"
hostPath: "/var/data/jenkins_python_pip_cache"
hostPath: "/var/data/jenkins_python_pipenv_cache"
hostPath: "/var/data/jenkins_sonar_cache"
hostPath: "/var/data/jenkins_sonar_cache"
hostPath: "/var/data/jenkins_nodejs_yarn_cache"
hostPath: "/var/data/jenkins_nodejs_npm_cache"
hostPath: "/var/data/jenkins_sonar_cache"
hostPath: "/var/data/jenkins_maven_cache"
hostPath: "/var/data/jenkins_sonar_cache"
hostPath: "/var/data/jenkins_go_cache"
hostPath: "/var/data/jenkins_sonar_cache"
hostPath: "/var/data/jenkins_python_pip_cache"
hostPath: "/var/data/jenkins_python_pipenv_cache"
hostPath: "/var/data/jenkins_sonar_cache"
你也可以修改 jenkins-casc-config ,将hostpath换成pvc。