Home > Back-end >  git shallow is not working for submodules over jenkins?
git shallow is not working for submodules over jenkins?

Time:01-15

I am working on the enter image description here

CodePudding user response:

This was also reported in Jenkins issue 60204 for git-scm plugin.
Make sure you have the latest version for that plugin.

Try and cleanup the Jenkins workspace associated with the job (with the help of the WS cleanup plugin)

As noted in JENKINS 63581:

The job definition you uploaded as config.xml includes the "clean before checkout" behavior but does not include the "wipe workspace" behavior.

The "clean before checkout" behavior retains the existing git repository (the .git directory) but removes untracked files.
It does that with the git clean -xfd command.

If the workspace had been previously populated with repository content, the "clean before checkout" does not remove that previously created content.

The git plugin tries to reduce data transfer by retaining the git repository across multiple builds in the same workspace.
You would need to add "Wipe workspace" to assure that the two workspaces have the same content.

If wipe workspace still shows a difference, then it is likely that there is a difference due to the two versions of command line git being used.

  •  Tags:  
  • Related