This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch 3.15.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus-examples.git
The following commit(s) were added to refs/heads/3.15.x by this push:
new 3424e85 Check that kubernetes manifest file exists before attempting
to modify it
3424e85 is described below
commit 3424e8507d6df152797f93475f3537bae9af31cd
Author: James Netherton <[email protected]>
AuthorDate: Wed Oct 9 09:13:23 2024 +0100
Check that kubernetes manifest file exists before attempting to modify it
---
file-bindy-ftp/pom.xml | 4 ++++
jpa-idempotent-repository/pom.xml | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/file-bindy-ftp/pom.xml b/file-bindy-ftp/pom.xml
index 52c6d32..e9f5496 100644
--- a/file-bindy-ftp/pom.xml
+++ b/file-bindy-ftp/pom.xml
@@ -296,6 +296,10 @@
["kubernetes", "openshift"].each { k8sResource
->
String sanitizedBasedir =
project.basedir.path.replace('\\', '/')
File file = new
File("${sanitizedBasedir}/src/main/kubernetes/${k8sResource}.yml")
+ if (!file.exists()) {
+ return
+ }
+
String content = file.text
Matcher matcher = pattern.matcher(content)
diff --git a/jpa-idempotent-repository/pom.xml
b/jpa-idempotent-repository/pom.xml
index 375a8c9..4caee64 100644
--- a/jpa-idempotent-repository/pom.xml
+++ b/jpa-idempotent-repository/pom.xml
@@ -308,6 +308,10 @@
["kubernetes", "openshift"].each { k8sResource
->
String sanitizedBasedir =
project.basedir.path.replace('\\', '/')
File file = new
File("${sanitizedBasedir}/src/main/kubernetes/${k8sResource}.yml")
+ if (!file.exists()) {
+ return
+ }
+
String content = file.text
Matcher matcher = pattern.matcher(content)