Skip to content

Added production flag to the redeploy argument. #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 31, 2025
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ jobs:

- name: Test deployment of a track not deployed without destroying the rest
run: |
ctf deploy --production --production --tracks mock-track-apache-php
ctf deploy --production --tracks mock-track-apache-php
[ "$(incus list --all-projects -cn -fcsv | wc -l)" -eq 1 ] || exit 1
ctf redeploy --production --tracks mock-track-python-service
[ "$(incus list --all-projects -cn -fcsv | wc -l)" -eq 2 ] || exit 1
Expand Down
7 changes: 6 additions & 1 deletion ctf/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,6 @@ def run_ansible_playbook(args: argparse.Namespace, track: str, path: str) -> Non


def redeploy(args: argparse.Namespace) -> None:
args.production = False
destroy(args=args)
deploy(args=args)

Expand Down Expand Up @@ -1381,6 +1380,12 @@ def main():
default=[],
help="Only redeploy the given tracks (use the folder name)",
)
parser_redeploy.add_argument(
"--production",
action="store_true",
default=False,
help="Do a production deployment. Only use this if you know what you're doing.",
)
parser_redeploy.add_argument(
"--remote",
default="local",
Expand Down
Loading