From 5f92033b61d9ae81d75cb48debf5faaadc62cfec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 9 Apr 2024 07:59:38 +0200 Subject: [PATCH] git clone project if it doesn't exist yet in local-merge case --- buildbot_nix/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/buildbot_nix/__init__.py b/buildbot_nix/__init__.py index d94a7ec..c60d8ca 100644 --- a/buildbot_nix/__init__.py +++ b/buildbot_nix/__init__.py @@ -357,6 +357,13 @@ class GitLocalPrMerge(steps.Git): msg = "git is not installed on worker" raise WorkerSetupError(msg) + has_git = yield self.pathExists( + self.build.path_module.join(self.workdir, ".git") + ) + + if not has_git: + yield self._dovccmd(["clone", "--recurse-submodules", self.repourl, "."]) + patched = yield self.sourcedirIsPatched() if patched: