Skip to content
Snippets Groups Projects
Commit de64a8b37e69 authored by Georges Racinet's avatar Georges Racinet :squid:
Browse files

push-release: new --latest option with down-to-earth impl

parent 72f418f75f97
No related branches found
No related tags found
No related merge requests found
Pipeline #85672 passed
......@@ -97,6 +97,21 @@
simulate=self.simulate)
self.docker('push', img_tag, simulate=self.simulate)
def push_latest(self, stable_series):
"""Promote the x-y-testing image to 'latest'."""
label = 'latest'
full_image_tags = []
for base_image in (BASE_IMAGE, ):
full_image_tags.append(
self.image_tag(label, base_image=base_image)
)
full_image_tags.extend(':'.join((repo, label))
for repo in self.extra_repos)
for img_tag in full_image_tags:
self.docker('tag', self.testing_img(stable_series), img_tag,
simulate=self.simulate)
self.docker('push', img_tag, simulate=self.simulate)
def series(s):
"""Validator for CLI args."""
......@@ -124,6 +139,8 @@
help="Used to derive the appropriate Docker rolling "
"tags (latest and testing). "
"Example values: 0-19, 0-20")
parser.add_argument('--latest', action='store_true',
help="Also tag as `latest` regardless of the series.")
parser.add_argument('--config',
help="Path to configuration file (TOML)",
default='config.toml')
......@@ -172,3 +189,5 @@
releaser.push_tag('latest',
tag_series=stable_series,
stable_series=stable_series)
if parsed_args.latest:
releaser.push_latest(stable_series)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment