...

Text file src/github.com/emissary-ingress/emissary/v3/releng/release-mirror-images

Documentation: github.com/emissary-ingress/emissary/v3/releng

     1#!/usr/bin/env python3
     2"""Mirror GA Docker images from one Docker registry to several others.
     3"""
     4
     5import os.path
     6import sys
     7import argparse
     8
     9from lib import mirror_artifacts, re_ga, re_ea
    10
    11
    12if __name__ == '__main__':
    13    parser = argparse.ArgumentParser(description='Mirror GA artifacts')
    14
    15    parser.add_argument('--ga-version', help='GA version', required=True)
    16    parser.add_argument('--source-repo', help='docker registry of source image', default=mirror_artifacts.default_source_repo)
    17    parser.add_argument("--repos", nargs="+", default=mirror_artifacts.default_repos)
    18
    19    args = parser.parse_args()
    20    if not re_ga.match(args.ga_version) and not re_ea.match(args.ga_version):
    21        sys.stderr.write(f"--ga-version must match X.Y.Z(-ea)?\n")
    22        sys.exit(2)
    23
    24    mirror_artifacts.mirror_images(
    25        repos=args.repos,
    26        tag=args.ga_version,
    27        source_repo=args.source_repo)
    28    sys.exit(0)

View as plain text