fix: custom labels only should have non-coolify labels

fix: pull helper image every 10 minutes instead of every deployment
This commit is contained in:
Andras Bacsai
2023-10-26 11:38:37 +02:00
parent f9c469497e
commit d7af57a95e
4 changed files with 68 additions and 8 deletions

View File

@@ -212,13 +212,11 @@ function generateLabelsApplication(Application $application, ?ApplicationPreview
$onlyPort = $ports[0];
}
$pull_request_id = data_get($preview, 'pull_request_id', 0);
// $container_name = generateApplicationContainerName($application, $pull_request_id);
$appId = $application->id;
if ($pull_request_id !== 0 && $pull_request_id !== null) {
$appId = $appId . '-pr-' . $pull_request_id;
}
$labels = collect([]);
$labels = $labels->merge(defaultLabels($appId, $application->uuid, $pull_request_id));
if ($application->fqdn) {
if ($pull_request_id !== 0) {
$domains = Str::of(data_get($preview, 'fqdn'))->explode(',');