jenkins 每次构建都要把完整项目pull下来

问题描述

通过日志发现每次点击构建后是通过sftp put git仓库的文件到达服务器 并且每次都要把完整的项目文件 put到服务器时间很慢

日志文件

Building in workspace /var/lib/jenkins/workspace/chasing
using credential xxx
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url https://git.xxx.com:3000/xxx/xxx.git # timeout=10
Fetching upstream changes from https://git.xxx.com:3000/xxx/xxx.git
 > git --version # timeout=10
using GIT_ASKPASS to set credentials xxx
 > git fetch --tags --progress https://git.xxx.com:3000/xxx/xxx.git +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/dev_paypal_rmphone^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/dev_paypal_rmphone^{commit} # timeout=10
Checking out Revision 894fa700dec7d96d25c84f83078f73a5acedfaed (refs/remotes/origin/dev_paypal_rmphone)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 894fa700dec7d96d25c84f83078f73a5acedfaed
Commit message: "jenkins 测试"
 > git rev-list --no-walk b5bf0485091c6891322071497f9eda5692fee584 # timeout=10
SSH: Connecting from host [localhost]
SSH: Connecting with configuration [香港测试] ...
SSH: Creating session: username [root], hostname [xx.xx.xx.xx], port [22]
SSH: Connecting session ...
SSH: Connected
SSH: Opening SFTP channel ...
SSH: SFTP channel open
SSH: Connecting SFTP channel ...
SSH: Connected
SSH: cd [/]
SSH: OK
SSH: cd [/]
SSH: OK
SSH: cd [var/www/xxx]
SSH: OK
SSH: put [README.md]
SSH: OK
SSH: cd [/]
SSH: OK
SSH: cd [var/www/xxx]
SSH: OK
...
...

相关配置文件

clipboard.png

clipboard.png

不知道是不是配置哪里出了问题

阅读 2.3k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题