Permettre la préparation seule de l'environnement Docker

... via l'utilisation du drapeau '--prepare-only'
This commit is contained in:
wpetit 2020-03-25 12:16:02 +01:00
parent db952bc2f7
commit 5fd65bbb89
1 changed files with 4 additions and 0 deletions

View File

@ -22,6 +22,7 @@ def create_args_parser():
parser.add_argument("--debug", help="Will add extra output and start the container in interactive mode", action="store_true", default=False) parser.add_argument("--debug", help="Will add extra output and start the container in interactive mode", action="store_true", default=False)
parser.add_argument("--cleanup", help="Clear the workspace and remove obsolete Docker images before build", action="store_true", default=False) parser.add_argument("--cleanup", help="Clear the workspace and remove obsolete Docker images before build", action="store_true", default=False)
parser.add_argument("--override-docker-args", help="Override all 'docker run' arguments. Use '[IMAGE_TAG]', '[PROFILE]' and '[ARCH]' to insert the corresponding values into your command.", default="") parser.add_argument("--override-docker-args", help="Override all 'docker run' arguments. Use '[IMAGE_TAG]', '[PROFILE]' and '[ARCH]' to insert the corresponding values into your command.", default="")
parser.add_argument("--prepare-only", help="Only prepare build environment for the given profile", action="store_true", default=False)
return parser return parser
@ -83,6 +84,9 @@ if __name__ == "__main__":
image_tag = build_image(build_workspace, base_image, args.profile, profile, debug=args.debug, rebuild=args.rebuild) image_tag = build_image(build_workspace, base_image, args.profile, profile, debug=args.debug, rebuild=args.rebuild)
if args.prepare_only:
exit()
kwargs = dict() kwargs = dict()
kwargs['debug'] = args.debug kwargs['debug'] = args.debug