Fix git clone command for deploy key + docker compose.
This commit is contained in:
parent
bd02c3055a
commit
d9599da4a8
1 changed files with 5 additions and 0 deletions
|
|
@ -862,6 +862,10 @@ function generateGitImportCommands(string $deployment_uuid, int $pull_request_id
|
||||||
if (!$only_checkout) {
|
if (!$only_checkout) {
|
||||||
$git_clone_command = $this->setGitImportSettings($deployment_uuid, $git_clone_command_base);
|
$git_clone_command = $this->setGitImportSettings($deployment_uuid, $git_clone_command_base);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
$git_clone_command = "git clone {$fullRepoUrl} -b {$this->git_branch} {$baseDir}";
|
||||||
|
}
|
||||||
|
|
||||||
if ($exec_in_docker) {
|
if ($exec_in_docker) {
|
||||||
$commands = collect([
|
$commands = collect([
|
||||||
executeInDocker($deployment_uuid, "mkdir -p /root/.ssh"),
|
executeInDocker($deployment_uuid, "mkdir -p /root/.ssh"),
|
||||||
|
|
@ -979,6 +983,7 @@ function loadComposeFile($isInit = false)
|
||||||
// $fileList->push(".$prComposeFile");
|
// $fileList->push(".$prComposeFile");
|
||||||
// }
|
// }
|
||||||
$commands = collect([
|
$commands = collect([
|
||||||
|
"rm -rf /tmp/{$uuid}",
|
||||||
"mkdir -p /tmp/{$uuid} && cd /tmp/{$uuid}",
|
"mkdir -p /tmp/{$uuid} && cd /tmp/{$uuid}",
|
||||||
$cloneCommand,
|
$cloneCommand,
|
||||||
"git sparse-checkout init --cone",
|
"git sparse-checkout init --cone",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue