Skip to content

Commit

Permalink
Set Docker image creation timestamp to latest git commit (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
cboone authored Dec 6, 2023
1 parent 65150fd commit 6383562
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@
</dependency>
</dependencies>

<scm>
<connection>scm:git:https://github.com/openmaptiles/planetiler-openmaptiles.git</connection>
<url>https://github.com/openmaptiles/planetiler-openmaptiles</url>
</scm>

<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -201,6 +206,25 @@
</executions>
</plugin>

<!-- Make latest git commit timestamp available to jib -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<doCheck>false</doCheck>
<doUpdate>false</doUpdate>
</configuration>
</plugin>

<!-- Create a runnable container -->
<plugin>
<groupId>com.google.cloud.tools</groupId>
Expand Down Expand Up @@ -228,6 +252,8 @@
</org.opencontainers.image.source>
</labels>
<mainClass>${mainClass}</mainClass>
<creationTime>${maven.build.timestamp}</creationTime>
<filesModificationTime>${maven.build.timestamp}</filesModificationTime>
</container>
</configuration>
</plugin>
Expand Down

0 comments on commit 6383562

Please sign in to comment.