From c9905248c29636b4029923d445f78a815197bb8a Mon Sep 17 00:00:00 2001 From: Georgios Andrianakis Date: Wed, 6 Sep 2023 10:57:33 +0300 Subject: [PATCH] Delete temporary openshift files Closes: #35747 (cherry picked from commit c14ba2bf4d0f8d9260fc5397d7a8431ef748af78) --- .../image/openshift/deployment/OpenshiftProcessor.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/extensions/container-image/container-image-openshift/deployment/src/main/java/io/quarkus/container/image/openshift/deployment/OpenshiftProcessor.java b/extensions/container-image/container-image-openshift/deployment/src/main/java/io/quarkus/container/image/openshift/deployment/OpenshiftProcessor.java index 13584271e1bb5..7354e21cab4e2 100644 --- a/extensions/container-image/container-image-openshift/deployment/src/main/java/io/quarkus/container/image/openshift/deployment/OpenshiftProcessor.java +++ b/extensions/container-image/container-image-openshift/deployment/src/main/java/io/quarkus/container/image/openshift/deployment/OpenshiftProcessor.java @@ -421,6 +421,12 @@ public static void createContainerImage(KubernetesClientBuilder kubernetesClient applyOpenshiftResources(openShiftClient, buildResources); openshiftBuild(buildResources, tar, openshiftConfig, kubernetesClientBuilder); + } finally { + try { + tar.delete(); + } catch (Exception e) { + LOG.warn("Unable to delete temporary file " + tar.toPath().toAbsolutePath(), e); + } } }