Skip to content

Commit

Permalink
Merge pull request #301 from mfdz/jib-maven-plugin
Browse files Browse the repository at this point in the history
Build container images via jib-maven-plugin
  • Loading branch information
leonardehrenfried authored Nov 11, 2024
2 parents 58b6507 + 2ad92b5 commit 2147be1
Show file tree
Hide file tree
Showing 7 changed files with 193 additions and 1 deletion.
27 changes: 27 additions & 0 deletions onebusaway-collections/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,31 @@
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<configuration>
<!-- we don't want jib to execute on this module -->
<skip>true</skip>
</configuration>
</plugin>
<!-- we want this library to be built reproducibly -->
<plugin>
<groupId>io.github.zlika</groupId>
<artifactId>reproducible-build-maven-plugin</artifactId>
<version>0.11</version>
<executions>
<execution>
<id>run-when-packaged</id>
<goals>
<goal>strip-jar</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
28 changes: 28 additions & 0 deletions onebusaway-csv-entities/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,32 @@
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<configuration>
<!-- we don't want jib to execute on this module -->
<skip>true</skip>
</configuration>
</plugin>
<!-- we want this library to be built reproducibly -->
<plugin>
<groupId>io.github.zlika</groupId>
<artifactId>reproducible-build-maven-plugin</artifactId>
<version>0.11</version>
<executions>
<execution>
<id>run-when-packaged</id>
<goals>
<goal>strip-jar</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
29 changes: 28 additions & 1 deletion onebusaway-gtfs-hibernate/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,33 @@
<artifactId>jaxb-impl</artifactId>
<scope>runtime</scope>
</dependency>
</dependencies>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<configuration>
<!-- we don't want jib to execute on this module -->
<skip>true</skip>
</configuration>
</plugin>
<!-- we want this library to be built reproducibly -->
<plugin>
<groupId>io.github.zlika</groupId>
<artifactId>reproducible-build-maven-plugin</artifactId>
<version>0.11</version>
<executions>
<execution>
<id>run-when-packaged</id>
<goals>
<goal>strip-jar</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
28 changes: 28 additions & 0 deletions onebusaway-gtfs-merge/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,32 @@
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<configuration>
<!-- we don't want jib to execute on this module -->
<skip>true</skip>
</configuration>
</plugin>
<!-- we want this library to be built reproducibly -->
<plugin>
<groupId>io.github.zlika</groupId>
<artifactId>reproducible-build-maven-plugin</artifactId>
<version>0.11</version>
<executions>
<execution>
<id>run-when-packaged</id>
<goals>
<goal>strip-jar</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
27 changes: 27 additions & 0 deletions onebusaway-gtfs-transformer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,31 @@
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<configuration>
<!-- we don't want jib to execute on this module -->
<skip>true</skip>
</configuration>
</plugin>
<!-- we want this library to be built reproducibly -->
<plugin>
<groupId>io.github.zlika</groupId>
<artifactId>reproducible-build-maven-plugin</artifactId>
<version>0.11</version>
<executions>
<execution>
<id>run-when-packaged</id>
<goals>
<goal>strip-jar</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
28 changes: 28 additions & 0 deletions onebusaway-gtfs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,32 @@
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<configuration>
<!-- we don't want jib to execute on this module -->
<skip>true</skip>
</configuration>
</plugin>
<!-- we want this library to be built reproducibly -->
<plugin>
<groupId>io.github.zlika</groupId>
<artifactId>reproducible-build-maven-plugin</artifactId>
<version>0.11</version>
<executions>
<execution>
<id>run-when-packaged</id>
<goals>
<goal>strip-jar</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
27 changes: 27 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,33 @@
</statelessTestsetInfoReporter>
</configuration>
</plugin>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>3.4.4</version>
<configuration>
<from>
<image>eclipse-temurin:21-jre</image>
<platforms>
<platform>
<architecture>amd64</architecture>
<os>linux</os>
</platform>
<platform>
<architecture>arm64</architecture>
<os>linux</os>
</platform>
</platforms>
</from>
<to>
<image>${env.CONTAINER_REPO}/${project.artifactId}:${project.version}</image>
<auth>
<username>${env.CONTAINER_REGISTRY_USER}</username>
<password>${env.CONTAINER_REGISTRY_PASSWORD}</password>
</auth>
</to>
</configuration>
</plugin>
</plugins>

<pluginManagement>
Expand Down

0 comments on commit 2147be1

Please sign in to comment.