Skip to content

Commit 79a97a9

Browse files
authored
[improve][build] Avoid building image multiple times (#17208)
Signed-off-by: Zixuan Liu <[email protected]>
1 parent b6f0f91 commit 79a97a9

File tree

2 files changed

+6
-82
lines changed

2 files changed

+6
-82
lines changed

Diff for: docker/pulsar-all/pom.xml

+3-41
Original file line numberDiff line numberDiff line change
@@ -138,46 +138,7 @@
138138
<phase>package</phase>
139139
<goals>
140140
<goal>build</goal>
141-
</goals>
142-
<configuration>
143-
<images>
144-
<image>
145-
<name>${docker.organization}/pulsar-all</name>
146-
<build>
147-
<contextDir>${project.basedir}</contextDir>
148-
<tags>
149-
<tag>latest</tag>
150-
<tag>${project.version}</tag>
151-
</tags>
152-
</build>
153-
</image>
154-
</images>
155-
</configuration>
156-
</execution>
157-
<execution>
158-
<id>push-latest</id>
159-
<goals>
160-
<goal>push</goal>
161-
</goals>
162-
<configuration>
163-
<images>
164-
<image>
165-
<name>${docker.organization}/pulsar-all</name>
166-
<build>
167-
<contextDir>${project.basedir}</contextDir>
168-
<tags>
169-
<tag>latest</tag>
170-
</tags>
171-
</build>
172-
</image>
173-
</images>
174-
</configuration>
175-
</execution>
176-
<execution>
177-
<id>add-no-repo</id>
178-
<phase>package</phase>
179-
<goals>
180-
<goal>build</goal>
141+
<goal>tag</goal>
181142
</goals>
182143
<configuration>
183144
<images>
@@ -187,11 +148,12 @@
187148
<contextDir>${project.basedir}</contextDir>
188149
<tags>
189150
<tag>latest</tag>
190-
<tag>${project.version}</tag>
191151
</tags>
192152
</build>
193153
</image>
194154
</images>
155+
<tagName>latest</tagName>
156+
<repo>${docker.organization}</repo>
195157
</configuration>
196158
</execution>
197159
</executions>

Diff for: docker/pulsar/pom.xml

+3-41
Original file line numberDiff line numberDiff line change
@@ -66,46 +66,7 @@
6666
<phase>package</phase>
6767
<goals>
6868
<goal>build</goal>
69-
</goals>
70-
<configuration>
71-
<images>
72-
<image>
73-
<name>${docker.organization}/pulsar</name>
74-
<build>
75-
<contextDir>${project.basedir}</contextDir>
76-
<tags>
77-
<tag>latest</tag>
78-
<tag>${project.version}</tag>
79-
</tags>
80-
</build>
81-
</image>
82-
</images>
83-
</configuration>
84-
</execution>
85-
<execution>
86-
<id>push-latest</id>
87-
<goals>
88-
<goal>push</goal>
89-
</goals>
90-
<configuration>
91-
<images>
92-
<image>
93-
<name>${docker.organization}/pulsar</name>
94-
<build>
95-
<contextDir>${project.basedir}</contextDir>
96-
<tags>
97-
<tag>latest</tag>
98-
</tags>
99-
</build>
100-
</image>
101-
</images>
102-
</configuration>
103-
</execution>
104-
<execution>
105-
<id>add-no-repo</id>
106-
<phase>package</phase>
107-
<goals>
108-
<goal>build</goal>
69+
<goal>tag</goal>
10970
</goals>
11071
<configuration>
11172
<images>
@@ -115,11 +76,12 @@
11576
<contextDir>${project.basedir}</contextDir>
11677
<tags>
11778
<tag>latest</tag>
118-
<tag>${project.version}</tag>
11979
</tags>
12080
</build>
12181
</image>
12282
</images>
83+
<tagName>latest</tagName>
84+
<repo>${docker.organization}</repo>
12385
</configuration>
12486
</execution>
12587
</executions>

0 commit comments

Comments
 (0)