-
New Feature
-
Resolution: Duplicate
-
Major
-
distributed builds, git plugin
We have a custom Jenkins plugin that executes git commands using GitAPI, for example launchCommand("pull", myRemoteRepo, myBranch).
When a build is launched on a slave the build fails because the git commands attempt to run on the Jenkins master instead of the slave.
Our workaround was to replace the LocalLauncher created by CliGitAPIImpl with the Launcher provided by Jenkins during setup (using reflection), so that builds on slaves have a RemoteLauncher. It would be preferable to have a constructor in GitAPI that takes an instance of Launcher so that we do not have to code against CliGitAPIImpl directly.
- is duplicated by
-
JENKINS-30600 git isn't run inside build container
-
- Open
-
GitAPI is deprecated, prefer GitClient. GitClient already handle remoting transparently.
Also, git-client plugin is designed to abstract git operations and let us provide alternate implementation (running command line cli is fragile), first one begin JGit with significant limitations, maybe a libgit2 JNA wrapper will be implemented on day or the other...