diff --git a/ctf/deploy.py b/ctf/deploy.py index 27b20bc..02790da 100644 --- a/ctf/deploy.py +++ b/ctf/deploy.py @@ -52,6 +52,10 @@ def deploy( bool, typer.Option("--force", help="Force the deployment even if there are errors."), ] = False, + skip_build: Annotated[ + bool, + typer.Option("--skip-build", help="Skip build container. (Use this only if you already have the necessary locally for the deploy.yaml to work!)") + ] = False, ): ENV["INCUS_REMOTE"] = remote # Run generate first. @@ -118,7 +122,7 @@ def deploy( t.name, ), # Running ansible on containers first then virtual machines ): - if track.require_build_container: + if not skip_build and track.require_build_container: run_ansible_playbook( remote=remote, production=production, diff --git a/ctf/redeploy.py b/ctf/redeploy.py index 41cae65..80cb58d 100644 --- a/ctf/redeploy.py +++ b/ctf/redeploy.py @@ -35,9 +35,21 @@ def redeploy( help="If there are artefacts remaining, delete them without asking.", ), ] = False, + skip_build: Annotated[ + bool, + typer.Option( + "--skip-build", + help="Skip build container. (Use this only if you already have the necessary locally for the deploy.yaml to work!)", + ), + ] = False, ) -> None: ENV["INCUS_REMOTE"] = remote destroy(tracks=tracks, production=production, remote=remote, force=force) deploy( - tracks=tracks, production=production, remote=remote, force=force, redeploy=True + tracks=tracks, + production=production, + remote=remote, + redeploy=True, + force=force, + skip_build=skip_build, ) diff --git a/pyproject.toml b/pyproject.toml index d04455c..13d0975 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,7 @@ dependencies = [ "typer==0.16.0", "pydantic" ] -version = "4.3.5" +version = "4.3.6" classifiers = [ "Programming Language :: Python :: 3", "Operating System :: OS Independent",