fix: build server should not have a proxy

This commit is contained in:
Andras Bacsai 2024-05-24 11:17:23 +02:00
parent 63e64b8bcc
commit 579ed5b9c0
2 changed files with 10 additions and 0 deletions

View File

@ -13,6 +13,13 @@ public function handle(Server $server, $fromUI = false)
if (!$server->isFunctional()) { if (!$server->isFunctional()) {
return false; return false;
} }
if ($server->isBuildServer()) {
if ($server->proxy) {
$server->proxy = null;
$server->save();
}
return false;
}
$proxyType = $server->proxyType(); $proxyType = $server->proxyType();
if (is_null($proxyType) || $proxyType === 'NONE' || $server->proxy->force_stop) { if (is_null($proxyType) || $proxyType === 'NONE' || $server->proxy->force_stop) {
ray('Not starting proxy'); ray('Not starting proxy');

View File

@ -97,6 +97,9 @@ public function submit()
if ($this->is_swarm_worker) { if ($this->is_swarm_worker) {
$payload['swarm_cluster'] = $this->selected_swarm_cluster; $payload['swarm_cluster'] = $this->selected_swarm_cluster;
} }
if ($this->is_build_server) {
data_forget($payload, 'proxy');
}
$server = Server::create($payload); $server = Server::create($payload);
if ($this->is_build_server) { if ($this->is_build_server) {
$this->is_swarm_manager = false; $this->is_swarm_manager = false;