refactor(previews): streamline preview domain generation logic in ApplicationDeploymentJob for improved clarity and maintainability
This commit is contained in:
parent
cacb7700de
commit
4df349f74d
1 changed files with 4 additions and 9 deletions
|
|
@ -229,16 +229,11 @@ public function __construct(public int $application_deployment_queue_id)
|
||||||
|
|
||||||
// Set preview fqdn
|
// Set preview fqdn
|
||||||
if ($this->pull_request_id !== 0) {
|
if ($this->pull_request_id !== 0) {
|
||||||
if ($this->application->build_pack === 'dockercompose') {
|
$this->preview = ApplicationPreview::findPreviewByApplicationAndPullId($this->application->id, $this->pull_request_id);
|
||||||
// For Docker Compose apps, use the preview model's compose-specific method
|
if ($this->preview) {
|
||||||
$this->preview = ApplicationPreview::findPreviewByApplicationAndPullId($this->application->id, $this->pull_request_id);
|
if ($this->application->build_pack === 'dockercompose') {
|
||||||
if ($this->preview) {
|
|
||||||
$this->preview->generate_preview_fqdn_compose();
|
$this->preview->generate_preview_fqdn_compose();
|
||||||
}
|
} else {
|
||||||
} else {
|
|
||||||
// For non-Docker Compose apps, use the preview model's method
|
|
||||||
$this->preview = ApplicationPreview::findPreviewByApplicationAndPullId($this->application->id, $this->pull_request_id);
|
|
||||||
if ($this->preview) {
|
|
||||||
$this->preview->generate_preview_fqdn();
|
$this->preview->generate_preview_fqdn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue