mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-13 22:15:35 +00:00
Merge remote-tracking branch 'origin/next' into chore/update-deployment-validation
This commit is contained in:
commit
1bad82cf43
10 files changed
+379
-22
No files matched your search
@@ -220,6 +220,7 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue
|
||||
$this->restart_only = $this->restart_only && $this->application->build_pack !== 'dockerimage' && $this->application->build_pack !== 'dockerfile';
|
||||
$this->only_this_server = $this->application_deployment_queue->only_this_server;
|
||||
$this->dockerImagePreviewTag = $this->application_deployment_queue->docker_registry_image_tag;
|
||||
$this->validateDockerRegistryImageConfiguration();
|
||||
|
||||
$this->git_type = data_get($this->application_deployment_queue, 'git_type');
|
||||
|
||||
@@ -1139,6 +1140,21 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue
|
||||
return $this->pull_request_id === 0;
|
||||
}
|
||||
|
||||
private function validateDockerRegistryImageConfiguration(): void
|
||||
{
|
||||
if (! ValidationPatterns::isValidDockerImageName($this->application->docker_registry_image_name)) {
|
||||
throw new DeploymentException('Docker registry image name contains invalid characters.');
|
||||
}
|
||||
|
||||
if (! ValidationPatterns::isValidDockerImageTag($this->application->docker_registry_image_tag)) {
|
||||
throw new DeploymentException('Docker registry image tag contains invalid characters.');
|
||||
}
|
||||
|
||||
if (! ValidationPatterns::isValidDockerImageTag($this->dockerImagePreviewTag)) {
|
||||
throw new DeploymentException('Docker registry preview image tag contains invalid characters.');
|
||||
}
|
||||
}
|
||||
|
||||
private function generate_image_names()
|
||||
{
|
||||
if ($this->application->dockerfile) {
|
||||
|
||||
Reference in new issue
Block a user