| I was first with confused by the the description that shallow submodule updates are used but the logged command didn't contain --depth=1. I guess it was edited somehow.
> git submodule update --remote impl/tool_protec # timeout=10
The provided fail.log contains the proper command logged
> git submodule update --remote --reference C:\jenkins\repo\submodule.git --depth=1 tool_protec # timeout=10
The reported git issue is not an issue of the new git-plugin 4.0.0.
hudson.plugins.git.GitException: Command "git submodule update --remote --reference C:\jenkins\repo\submodule.git --depth=1 tool_protec" returned status code 1:
stdout:
stderr: Cloning into 'C:/jenkins/workspace/submoduletest/master/tool_protec'...
fatal: Needed a single revision
Unable to find current origin/development revision in submodule path 'tool_protec'
You should also be able to reproduce it on the command line without Jenkins and this plugin involved. It's due to the fact that only fetching a single commit from the submodule repository but wanting to resolve the "origin/development" revision which is I guess not the latest commit. You can find plenty of such failed updates reported when searching the Internet for "git submodule update Unable to find current revision in submodule path". The other issue reported in the logs is I guess due to some invalid usage in the Jenkinsfile. Please double check this.
Error when executing always post condition:
org.jenkinsci.plugins.workflow.steps.MissingContextVariableException: Required context class hudson.FilePath is missing
Does this sound reasonable to you Benjamin Brummer? |