fix: empty build variables
This commit is contained in:
		@@ -279,13 +279,13 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
 | 
				
			|||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
                $this->write_deployment_configurations();
 | 
					                $this->write_deployment_configurations();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            $this->execute_remote_command(
 | 
					            // $this->execute_remote_command(
 | 
				
			||||||
                [
 | 
					            //     [
 | 
				
			||||||
                    "docker rm -f {$this->deployment_uuid} >/dev/null 2>&1",
 | 
					            //         "docker rm -f {$this->deployment_uuid} >/dev/null 2>&1",
 | 
				
			||||||
                    "hidden" => true,
 | 
					            //         "hidden" => true,
 | 
				
			||||||
                    "ignore_errors" => true,
 | 
					            //         "ignore_errors" => true,
 | 
				
			||||||
                ]
 | 
					            //     ]
 | 
				
			||||||
            );
 | 
					            // );
 | 
				
			||||||
            $this->execute_remote_command(
 | 
					            $this->execute_remote_command(
 | 
				
			||||||
                [
 | 
					                [
 | 
				
			||||||
                    "docker image prune -f >/dev/null 2>&1",
 | 
					                    "docker image prune -f >/dev/null 2>&1",
 | 
				
			||||||
@@ -1022,11 +1022,15 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
 | 
				
			|||||||
        $this->env_nixpacks_args = collect([]);
 | 
					        $this->env_nixpacks_args = collect([]);
 | 
				
			||||||
        if ($this->pull_request_id === 0) {
 | 
					        if ($this->pull_request_id === 0) {
 | 
				
			||||||
            foreach ($this->application->nixpacks_environment_variables as $env) {
 | 
					            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 {
 | 
					        } else {
 | 
				
			||||||
            foreach ($this->application->nixpacks_environment_variables_preview as $env) {
 | 
					            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([]);
 | 
					        $this->env_args = collect([]);
 | 
				
			||||||
        if ($this->pull_request_id === 0) {
 | 
					        if ($this->pull_request_id === 0) {
 | 
				
			||||||
            foreach ($this->application->build_environment_variables as $env) {
 | 
					            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 {
 | 
					        } else {
 | 
				
			||||||
            foreach ($this->application->build_environment_variables_preview as $env) {
 | 
					            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);
 | 
					        $this->env_args->put('SOURCE_COMMIT', $this->commit);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user