GIT Jenkins插件克隆而不是拉

时间:2015-10-30 18:15:07

标签: git jenkins

我正在使用GIT Jenkins插件。它克隆了git存储库,而不是运行git pull。

如何强制它运行git pull?

Cloning the remote Git repository
Cloning repository git@git.corp.example.com:example/example.git

1 个答案:

答案 0 :(得分:1)

If you are clearing out your workspace between builds, or if your build is on a node that doesn't have the source code already, the plugin will clone the repo; because, there is nothing to pull.

I suggest finding your workspace within your Jenkins slave , prior to running your Jenkins job. I imagine you'll find it lacks source code. If it has source code, check that you're not cleaning your workspace or otherwise forcing the clone.

Note that in a multi-slave environment, any Jenkins slave could be the one that does the build. Also, if you are building on the Master node, I suggest that you reconfigure to not do that; as the workflows building on the master node are subtly different than building on remote slaves (and debugging between the two is always problematic).