Skip to content

Commit da01ce4

Browse files
authored
Merge pull request #14 from nsec/fixing-redeploy-with-production-flag
Added production flag to the redeploy argument.
2 parents 7ea0040 + a28ed45 commit da01ce4

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ jobs:
149149
150150
- name: Test deployment of a track not deployed without destroying the rest
151151
run: |
152-
ctf deploy --production --production --tracks mock-track-apache-php
152+
ctf deploy --production --tracks mock-track-apache-php
153153
[ "$(incus list --all-projects -cn -fcsv | wc -l)" -eq 1 ] || exit 1
154154
ctf redeploy --production --tracks mock-track-python-service
155155
[ "$(incus list --all-projects -cn -fcsv | wc -l)" -eq 2 ] || exit 1

ctf/__main__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,6 @@ def run_ansible_playbook(args: argparse.Namespace, track: str, path: str) -> Non
847847

848848

849849
def redeploy(args: argparse.Namespace) -> None:
850-
args.production = False
851850
destroy(args=args)
852851
deploy(args=args)
853852

@@ -1381,6 +1380,12 @@ def main():
13811380
default=[],
13821381
help="Only redeploy the given tracks (use the folder name)",
13831382
)
1383+
parser_redeploy.add_argument(
1384+
"--production",
1385+
action="store_true",
1386+
default=False,
1387+
help="Do a production deployment. Only use this if you know what you're doing.",
1388+
)
13841389
parser_redeploy.add_argument(
13851390
"--remote",
13861391
default="local",

0 commit comments

Comments
 (0)