Fix directory creation inApplicationDeploymentJob.php

This commit is contained in:
Andras Bacsai 2023-12-01 12:13:55 +01:00
parent dc03179bd1
commit 2352e4a71d

View File

@ -701,7 +701,15 @@ private function prepare_builder_image()
[
"command" => executeInDocker($this->deployment_uuid, "mkdir -p {$this->basedir}")
],
);
if ($this->restart_only || !$this->force_rebuild) {
$this->execute_remote_command(
[
"command" => executeInDocker($this->deployment_uuid, "mkdir -p {$this->workdir}")
],
);
}
}
private function deploy_to_additional_destinations()
{
@ -1285,7 +1293,6 @@ private function add_build_env_variables_to_dockerfile()
$dockerfile->splice(1, 0, "ARG {$env->key}={$env->value}");
}
}
ray($dockerfile->implode("\n"));
$dockerfile_base64 = base64_encode($dockerfile->implode("\n"));
$this->execute_remote_command([
executeInDocker($this->deployment_uuid, "echo '{$dockerfile_base64}' | base64 -d > {$this->workdir}{$this->dockerfile_location}"),