Skip to content

Commit

Permalink
[improve][build] Avoid building image multiple times (#17208)
Browse files Browse the repository at this point in the history
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
  • Loading branch information
nodece authored Nov 10, 2022
1 parent b6f0f91 commit 79a97a9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 82 deletions.
44 changes: 3 additions & 41 deletions docker/pulsar-all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,46 +138,7 @@
<phase>package</phase>
<goals>
<goal>build</goal>
</goals>
<configuration>
<images>
<image>
<name>${docker.organization}/pulsar-all</name>
<build>
<contextDir>${project.basedir}</contextDir>
<tags>
<tag>latest</tag>
<tag>${project.version}</tag>
</tags>
</build>
</image>
</images>
</configuration>
</execution>
<execution>
<id>push-latest</id>
<goals>
<goal>push</goal>
</goals>
<configuration>
<images>
<image>
<name>${docker.organization}/pulsar-all</name>
<build>
<contextDir>${project.basedir}</contextDir>
<tags>
<tag>latest</tag>
</tags>
</build>
</image>
</images>
</configuration>
</execution>
<execution>
<id>add-no-repo</id>
<phase>package</phase>
<goals>
<goal>build</goal>
<goal>tag</goal>
</goals>
<configuration>
<images>
Expand All @@ -187,11 +148,12 @@
<contextDir>${project.basedir}</contextDir>
<tags>
<tag>latest</tag>
<tag>${project.version}</tag>
</tags>
</build>
</image>
</images>
<tagName>latest</tagName>
<repo>${docker.organization}</repo>
</configuration>
</execution>
</executions>
Expand Down
44 changes: 3 additions & 41 deletions docker/pulsar/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,46 +66,7 @@
<phase>package</phase>
<goals>
<goal>build</goal>
</goals>
<configuration>
<images>
<image>
<name>${docker.organization}/pulsar</name>
<build>
<contextDir>${project.basedir}</contextDir>
<tags>
<tag>latest</tag>
<tag>${project.version}</tag>
</tags>
</build>
</image>
</images>
</configuration>
</execution>
<execution>
<id>push-latest</id>
<goals>
<goal>push</goal>
</goals>
<configuration>
<images>
<image>
<name>${docker.organization}/pulsar</name>
<build>
<contextDir>${project.basedir}</contextDir>
<tags>
<tag>latest</tag>
</tags>
</build>
</image>
</images>
</configuration>
</execution>
<execution>
<id>add-no-repo</id>
<phase>package</phase>
<goals>
<goal>build</goal>
<goal>tag</goal>
</goals>
<configuration>
<images>
Expand All @@ -115,11 +76,12 @@
<contextDir>${project.basedir}</contextDir>
<tags>
<tag>latest</tag>
<tag>${project.version}</tag>
</tags>
</build>
</image>
</images>
<tagName>latest</tagName>
<repo>${docker.organization}</repo>
</configuration>
</execution>
</executions>
Expand Down

0 comments on commit 79a97a9

Please sign in to comment.