Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Add -R option to ci/build.py to avoid rebuilding containers #15426

Merged
merged 1 commit into from
Jul 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion ci/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,10 @@ def main() -> int:
help="Only build the container, don't build the project",
action='store_true')

parser.add_argument("-R", "--run-only",
help="Only run the container, don't rebuild the container",
action='store_true')

parser.add_argument("-a", "--all",
help="build for all platforms",
action='store_true')
Expand Down Expand Up @@ -492,8 +496,12 @@ def signal_handler(signum, _):
tag = get_docker_tag(platform=platform, registry=args.docker_registry)
if args.docker_registry:
load_docker_cache(tag=tag, docker_registry=args.docker_registry)
build_docker(platform=platform, docker_binary=docker_binary, registry=args.docker_registry,
if not args.run_only:
build_docker(platform=platform, docker_binary=docker_binary, registry=args.docker_registry,
num_retries=args.docker_build_retries, no_cache=args.no_cache)
else:
logging.info("Skipping docker build step.")

if args.build_only:
logging.warning("Container was just built. Exiting due to build-only.")
return 0
Expand Down