9/16/2023 0 Comments Git submodule reset![]() ![]() Stderr: error: pathspec 'modules/upstream/locales' did not match any file(s) known to git. > git submodule update modules/upstream/localesįATAL: Command "git submodule update modules/upstream/locales" returned status code 1: > git config -get submodule.modules/upstream/accounts.url # timeout=10 > git config -get-regexp ^submodule # timeout=10 > git rev-parse -verify HEAD # timeout=10 > git config core.sparsecheckout # timeout=10 > git submodule foreach git clean -fdx # timeout=10Ĭhecking out Revision ab59656484b83bd33e8bdcca07116db660a27b61 (origin/feature/mcollective_modules) > git submodule foreach -recursive git reset -hard # timeout=10 One case is that old cucumber test reports are found. This can seriously impact reliability of build or even fail them. Since the workspaces are reused between builds, there is a big risk that code or generated files in that sub-directory from previous builds are still there. So Jenkins git plugin should call 'git clean -dxf -f' in that case.Īn alternative use case, which I believe is very common, is that a pipeline checks out a repository in a sub-directory. One case is that old cucumber test reports are found.Ĭompletely wiping the workspace has a performance cost that is unreasonable. Since the workspaces are reused between builds, there is a big risk that code or generated files in that sub-directory from previous builds are still there in the next run. Pipelines workspace reuseĪn alternative use case, which I believe is very common, is that a pipeline checks out a repository in a sub-directory. ![]() So Jenkins git plugin should call 'git clean -dxf -f' in that case. If another '-f' is added, also the removed submodule will be deleted which is the behavior I'd expect when git submodules are in use. This works for most stuff but it does not work if git submodule is removed from the tree which leaves the submodule directory in workspace even after 'git clean -dxf'. When "Clean before checkout" is selected, it runs 'git reset -hard & git clean -dxf' on the repository and submodules if "Recursively update submodules" is selected. Jenkins SCM plugin can handle git repositories with submodules except for clean up. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |