Jobs running on Ubuntu Trusty for repositories with submodules are currently broken due to a bug in the Jenkins GIT Plugin.
We use Jenkins GIT Plugin 1.5.0, which uses git-client-plugin 1.0.6:
https://github.com/jenkinsci/git-client-plugin/blob/git-client-1.0.6/src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java#L401-L412
args.add("submodule", "foreach"); if (recursive) { args.add("--recursive"); } args.add("git reset"); if (hard) { args.add("--hard"); }
https://integration.wikimedia.org/ci/job/mwext-VisualEditor-npm/4684/console
Cleaning workspace
Resetting working tree
FATAL: Command "submodule foreach --recursive git reset --hard" returned status code 1:
stdout: Entering 'lib/ve'
stderr: /usr/lib/git-core/git-submodule: 552: /usr/lib/git-core/git-submodule: git reset: not found
Stopping at 'lib/ve'; script returned non-zero status.
Trying to reproduce:
jenkins-deploy@integration-slave1007:/mnt/jenkins-workspace/workspace/mwext-VisualEditor-npm$ git submodule foreach --recursive git reset --hard
works fine
The version of git on Ubunty and Precise both support this command.
The problem lies in the quoting and separation of the arguments.
jenkins-deploy@integration-slave1007:/mnt/jenkins-workspace/workspace/mwext-VisualEditor-npm$ git submodule foreach --recursive 'git reset' --hard
/usr/lib/git-core/git-submodule: 552: /usr/lib/git-core/git-submodule: git reset: not found
Version: wmf-deployment
Severity: critical