Skip to content

Commit bc5704d

Browse files
committed
Always call ContainerEngine.build() when pushing
This is so that if the image is built but not pushed it will still be pushed
1 parent 32503ab commit bc5704d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

repo2docker/app.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,10 @@ def build(self):
733733
try:
734734
self.fetch(self.repo, self.ref, checkout_path)
735735

736-
if self.find_image():
736+
if self.find_image() and not self.push:
737+
# If push is requested we don't have a general way to query the registry.
738+
# ContainerEngine.build() also handles pushing, so always "build" and
739+
# rely on the implementation to decide whether to rebuild.
737740
self.log.info(
738741
f"Reusing existing image ({self.output_image_spec}), not building."
739742
)

0 commit comments

Comments
 (0)