fix: empty build variables

This commit is contained in:
Andras Bacsai 2024-02-19 09:19:50 +01:00
parent 92e3e8ab7b
commit 126ac354d5

View File

@ -279,13 +279,13 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
} else {
$this->write_deployment_configurations();
}
$this->execute_remote_command(
[
"docker rm -f {$this->deployment_uuid} >/dev/null 2>&1",
"hidden" => true,
"ignore_errors" => true,
]
);
// $this->execute_remote_command(
// [
// "docker rm -f {$this->deployment_uuid} >/dev/null 2>&1",
// "hidden" => true,
// "ignore_errors" => true,
// ]
// );
$this->execute_remote_command(
[
"docker image prune -f >/dev/null 2>&1",
@ -1022,11 +1022,15 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
$this->env_nixpacks_args = collect([]);
if ($this->pull_request_id === 0) {
foreach ($this->application->nixpacks_environment_variables as $env) {
$this->env_nixpacks_args->push("--env {$env->key}={$env->real_value}");
if (!is_null($env->real_value)) {
$this->env_nixpacks_args->push("--env {$env->key}={$env->real_value}");
}
}
} else {
foreach ($this->application->nixpacks_environment_variables_preview as $env) {
$this->env_nixpacks_args->push("--env {$env->key}={$env->real_value}");
if (!is_null($env->real_value)) {
$this->env_nixpacks_args->push("--env {$env->key}={$env->real_value}");
}
}
}
@ -1037,11 +1041,15 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
$this->env_args = collect([]);
if ($this->pull_request_id === 0) {
foreach ($this->application->build_environment_variables as $env) {
$this->env_args->put($env->key, $env->real_value);
if (!is_null($env->real_value)) {
$this->env_args->put($env->key, $env->real_value);
}
}
} else {
foreach ($this->application->build_environment_variables_preview as $env) {
$this->env_args->put($env->key, $env->real_value);
if (!is_null($env->real_value)) {
$this->env_args->put($env->key, $env->real_value);
}
}
}
$this->env_args->put('SOURCE_COMMIT', $this->commit);