From 78ffe7e1d0aa2a1d164a7237dcf04a0d3377e046 Mon Sep 17 00:00:00 2001 From: Jakub Cechacek Date: Tue, 19 Sep 2023 11:13:00 +0200 Subject: [PATCH] DBZ-6738 Functional bundle can be generated during maven build This uses combination of maven resources plugin to perform property filtering and Fabric8 docker plugin to wire OLM and QOSDK configuration together. --- pom.xml | 66 ++++++++++++++++++- .../operator/DebeziumCsvMetadata.java | 2 +- 2 files changed, 64 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index ba1fd7e..5a35649 100644 --- a/pom.xml +++ b/pom.xml @@ -24,6 +24,7 @@ UTF-8 17 17 + yyyy-MM-dd'T'HH:mm:ss'Z' ${project.version} @@ -32,6 +33,9 @@ 3.4.0 3.0.0 3.11.0 + 3.3.1 + 0.43.4 + 3.24.2 @@ -44,7 +48,6 @@ false - ${project.artifactId} quay.io debezium operator @@ -52,6 +55,11 @@ debezium-operator ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.x + ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}-nightly + debezium-operator.v${olm.bundle.version} + + ${quarkus.container-image.registry}/${quarkus.container-image.group}/${quarkus.container-image.name}:${quarkus.container-image.tag} + ${maven.build.timestamp} 17 @@ -216,6 +224,7 @@ ${project.parent.version} debezium-${version.debezium.channel} + ${project.parent.version} @@ -228,6 +237,11 @@ olmUpdate + + true + + $$ + @@ -242,17 +256,63 @@ copy-resources - ${project.basedir}/olm/bundles/${project.parent.version} + ${project.basedir}/olm/bundles/${olm.bundle.version} - ${project.build.directory}/bundle/debezium-operator + + ${project.build.directory}/bundle/${dollar}{olm.bundle.name} **/* + true + true + + + + + + + io.fabric8 + docker-maven-plugin + ${version.docker.maven.plugin} + + + + yq + mikefarah/yq:latest + + true + + + ${project.basedir}/olm/bundles/${olm.bundle.version}:/workdir + + + + + ea + -i + .spec.install.spec.deployments[0].spec.template.spec.containers[0].env += [{"name": "QUARKUS_OPERATOR_SDK_NAMESPACES", "valueFrom": {"fieldRef": {"fieldPath": "metadata.annotations['olm.targetNamespaces']"}}}] + manifests/${olm.bundle.name}.clusterserviceversion.yaml + + + + + + + + + wire-olm + package + + start + + + + diff --git a/src/main/java/io/debezium/operator/DebeziumCsvMetadata.java b/src/main/java/io/debezium/operator/DebeziumCsvMetadata.java index 4a61a51..5c2a128 100644 --- a/src/main/java/io/debezium/operator/DebeziumCsvMetadata.java +++ b/src/main/java/io/debezium/operator/DebeziumCsvMetadata.java @@ -89,5 +89,5 @@ "Start it up, point it at your databases, and your apps can start responding " + "to all of the inserts, updates, and deletes that other apps commit to your databases") public class DebeziumCsvMetadata implements SharedCSVMetadata { - public static final String NAME = "debezium-operator"; + public static final String NAME = "${olm.bundle.name}"; }