Legoktm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382347 )
Change subject: build.py: Improve "docker push" output ...................................................................... build.py: Improve "docker push" output Move it to the bottom of the script output so it's easily readable and is only output after all the tests pass. Change-Id: I765d4d6e0c683cc23763a9d8ca70d8039bcb3f73 --- M dockerfiles/build.py 1 file changed, 13 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/47/382347/1 diff --git a/dockerfiles/build.py b/dockerfiles/build.py index 3edd273..5df8dfd 100755 --- a/dockerfiles/build.py +++ b/dockerfiles/build.py @@ -18,6 +18,9 @@ class DockerBuilder(object): + def __init__(self): + self.pushes = [] + def run(self): self.parse_args() @@ -33,7 +36,12 @@ ] else: dockerfiles = self.find_docker_files() - return all(map(self.build, dockerfiles)) + if not all(map(self.build, dockerfiles)): + return False + + self.log.info('You can push the following images when ready: %s' + % ' && '.join('docker push %s' + % name for name in self.pushes)) def load_config(self): config = configparser.ConfigParser() @@ -110,9 +118,6 @@ cmd = ['docker', 'tag', tagged_img, '%s:latest' % img] self.log.info(' '.join(cmd)) subprocess.check_call(cmd) - self.log.info('You can push the images when ready: ' - 'docker push %s && docker push %s:latest' - % (tagged_img, img)) finally: for f in glob(os.path.join(image_dir, ".cache-buster*")): os.remove(f) @@ -122,6 +127,10 @@ self.log.info('Running rests') subprocess.check_call(['bash', 'example-run.sh'], cwd=image_dir) + self.pushes.append(tagged_img) + self.pushes.append('%s:latest' % img) + + if self.args.update_jjb: self.update_jjb(img, tagged_img) -- To view, visit https://gerrit.wikimedia.org/r/382347 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I765d4d6e0c683cc23763a9d8ca70d8039bcb3f73 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Legoktm <lego...@member.fsf.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits