Skip to content

Commit

Permalink
feat: Add jib plugins versions to catalog runtime metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
gansheer authored and squakez committed Oct 9, 2023
1 parent 83a7c4f commit 3b36cdb
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 1 deletion.
14 changes: 13 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@
<maven-plugin-tools-version>3.8.2</maven-plugin-tools-version>
<maven-shaded-version>3.3.2</maven-shaded-version>
<cyclonedx-maven-plugin-version>2.7.9</cyclonedx-maven-plugin-version>

<jib-maven-plugin-version>3.3.2</jib-maven-plugin-version>
<jib-layer-filter-extension-maven-version>0.3.0</jib-layer-filter-extension-maven-version>
</properties>

<developers>
Expand Down Expand Up @@ -588,7 +591,16 @@
<artifactId>maven-plugin-api</artifactId>
<version>${maven-plugin-api-version}</version>
</dependency>

<dependency>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>${jib-maven-plugin-version}</version>
</dependency>
<dependency>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-layer-filter-extension-maven</artifactId>
<version>${jib-layer-filter-extension-maven-version}</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down
2 changes: 2 additions & 0 deletions support/camel-k-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@
<camelQuarkusVersion>${camel-quarkus-version}</camelQuarkusVersion>
<quarkusVersion>${quarkus-version}</quarkusVersion>
<quarkusNativeBuilderImage>${quarkus-native-builder-image}</quarkusNativeBuilderImage>
<jibMavenPluginVersion>${jib-maven-plugin-version}</jibMavenPluginVersion>
<jibLayerFilterExtensionMavenVersion>${jib-layer-filter-extension-maven-version}</jibLayerFilterExtensionMavenVersion>
</scriptVariables>
<pomIncludes>
<pomInclude>generate-catalog/pom.xml</pomInclude>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ new File(basedir, "catalog.yaml").withReader {
//assert catalog.spec.runtime.metadata['quarkus.version'] == quarkusVersion
assert catalog.spec.runtime.metadata['camel-quarkus.version'] == camelQuarkusVersion
assert catalog.spec.runtime.metadata['quarkus.native-builder-image'] == quarkusNativeBuilderImage
assert catalog.spec.runtime.metadata['jib.maven-plugin.version'] == jibMavenPluginVersion
assert catalog.spec.runtime.metadata['jib.layer-filter-extension-maven.version'] == jibLayerFilterExtensionMavenVersion

assert catalog.spec.runtime.dependencies.any {
it.groupId == 'org.apache.camel.k' && it.artifactId == 'camel-k-runtime'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,11 @@ public void execute() throws MojoExecutionException, MojoFailureException {

runtimeSpec.putMetadata("quarkus.native-builder-image", MavenSupport.getApplicationProperty(getClass(), "quarkus.native-builder-image"));

runtimeSpec.putMetadata("jib.maven-plugin.version",
MavenSupport.getApplicationProperty(getClass(), "jib.maven-plugin.version"));
runtimeSpec.putMetadata("jib.layer-filter-extension-maven.version",
MavenSupport.getApplicationProperty(getClass(), "jib.layer-filter-extension-maven.version"));

runtimeSpec.applicationClass("io.quarkus.bootstrap.runner.QuarkusEntryPoint");
runtimeSpec.addDependency("org.apache.camel.k", "camel-k-runtime");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@
## ---------------------------------------------------------------------------

quarkus.native-builder-image=${quarkus-native-builder-image}
jib.maven-plugin.version=${jib-maven-plugin-version}
jib.layer-filter-extension-maven.version=${jib-layer-filter-extension-maven-version}

0 comments on commit 3b36cdb

Please sign in to comment.