From df6ec0c8ba70e224a3a5ee1e1a7ca21e2f4046dd Mon Sep 17 00:00:00 2001 From: Ian Tewksbury Date: Thu, 9 Sep 2021 14:44:25 -0400 Subject: [PATCH] deploy/argo - use tag rather then branch for revision so that prod doesn't get updated when updating helm chart values for test both of which currently point at 'main' branch in the argo config --- src/ploigos_step_runner/step_implementers/deploy/argocd.py | 2 +- tests/step_implementers/deploy/test_argocd.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ploigos_step_runner/step_implementers/deploy/argocd.py b/src/ploigos_step_runner/step_implementers/deploy/argocd.py index 03e8776b9..b54ab2eed 100644 --- a/src/ploigos_step_runner/step_implementers/deploy/argocd.py +++ b/src/ploigos_step_runner/step_implementers/deploy/argocd.py @@ -332,7 +332,7 @@ def _run_step(self): # pylint: disable=too-many-locals ArgoCD.__argocd_app_create_or_update( argocd_app_name=argocd_app_name, repo=deployment_config_repo, - revision=deployment_config_repo_branch, + revision=deployment_config_repo_tag, path=deployment_config_helm_chart_path, dest_server=deployment_config_destination_cluster_uri, auto_sync=self.get_value('argocd-auto-sync'), diff --git a/tests/step_implementers/deploy/test_argocd.py b/tests/step_implementers/deploy/test_argocd.py index f535def0e..c95d05dd2 100644 --- a/tests/step_implementers/deploy/test_argocd.py +++ b/tests/step_implementers/deploy/test_argocd.py @@ -363,7 +363,7 @@ def test_ArgoCD_run_step_success( argocd_app_create_or_update_mock.assert_called_once_with( argocd_app_name='test-app-name', repo=step_config['deployment-config-repo'], - revision='feature/test', + revision='v0.42.0', path=step_config['deployment-config-helm-chart-path'], dest_server='https://kubernetes.default.svc', auto_sync=True, @@ -518,7 +518,7 @@ def test_ArgoCD_run_step_success_no_prune( argocd_app_create_or_update_mock.assert_called_once_with( argocd_app_name='test-app-name', repo=step_config['deployment-config-repo'], - revision='feature/test', + revision='v0.42.0', path=step_config['deployment-config-helm-chart-path'], dest_server='https://kubernetes.default.svc', auto_sync=True, @@ -673,7 +673,7 @@ def test_ArgoCD_run_step_success_additional_helm_values_files( argocd_app_create_or_update_mock.assert_called_once_with( argocd_app_name='test-app-name', repo=step_config['deployment-config-repo'], - revision='feature/test', + revision='v0.42.0', path=step_config['deployment-config-helm-chart-path'], dest_server='https://kubernetes.default.svc', auto_sync=True,