Skip to content

Commit

Permalink
[improve][build] Avoid building image multiple times
Browse files Browse the repository at this point in the history
Signed-off-by: Zixuan Liu <[email protected]>
  • Loading branch information
nodece committed Aug 23, 2022
1 parent f506054 commit c3356aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 80 deletions.
43 changes: 3 additions & 40 deletions docker/pulsar-all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@
<phase>package</phase>
<goals>
<goal>build</goal>
<goal>tag</goal>
</goals>
<configuration>
<images>
Expand All @@ -152,46 +153,8 @@
</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>
</goals>
<configuration>
<images>
<image>
<name>pulsar-all</name>
<build>
<contextDir>${project.basedir}</contextDir>
<tags>
<tag>latest</tag>
<tag>${project.version}</tag>
</tags>
</build>
</image>
</images>
<tagName>latest</tagName>
<repo>pulsar-all</repo>
</configuration>
</execution>
</executions>
Expand Down
43 changes: 3 additions & 40 deletions docker/pulsar/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
<phase>package</phase>
<goals>
<goal>build</goal>
<goal>tag</goal>
</goals>
<configuration>
<images>
Expand All @@ -129,46 +130,8 @@
</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>
</goals>
<configuration>
<images>
<image>
<name>pulsar</name>
<build>
<contextDir>${project.basedir}</contextDir>
<tags>
<tag>latest</tag>
<tag>${project.version}</tag>
</tags>
</build>
</image>
</images>
<tagName>latest</tagName>
<repo>pulsar</repo>
</configuration>
</execution>
</executions>
Expand Down

0 comments on commit c3356aa

Please sign in to comment.