Skip to content

Commit 550a137

Browse files
authored
Issue 637 - v1.3.0 (#639)
* #637: exit with error when not healthy Signed-off-by: Laurent Rochette <[email protected]>
1 parent cb92aa6 commit 550a137

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

incubating/argo-cd-sync/argocd_sync.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
WAIT_ROLLBACK = True if os.getenv('WAIT_ROLLBACK', "false").lower() == "true" else False
1919
ROLLBACK = True if os.getenv('ROLLBACK', "false").lower() == "true" else False
20-
if WAIT_ROLLBACK: ROLLBACK = True
20+
if WAIT_ROLLBACK: ROLLBACK = True
2121

2222
CF_URL = os.getenv('CF_URL', 'https://g.codefresh.io')
2323
CF_API_KEY = os.getenv('CF_API_KEY')
@@ -70,7 +70,9 @@ def main():
7070
CF_OUTPUT_URL_VAR = CF_STEP_NAME + '_CF_OUTPUT_URL'
7171
link_to_app = get_link_to_apps_dashboard()
7272
export_variable(CF_OUTPUT_URL_VAR, link_to_app)
73-
73+
if status != "HEALTHY":
74+
logging.debug("Status is not HEALTHY. Exiting with error.")
75+
sys.exit(1)
7476

7577
#######################################################################
7678

incubating/argo-cd-sync/step.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
kind: step-type
22
metadata:
33
name: argo-cd-sync
4-
version: 1.2.2
4+
version: 1.3.0
55
isPublic: true
66
description: Syncs Argo CD apps managed by our GitOps Runtimes
77
sources:
@@ -111,7 +111,7 @@ spec:
111111
},
112112
"IMAGE_TAG": {
113113
"type": "string",
114-
"default": "1.2.2",
114+
"default": "1.3.0",
115115
"description": "OPTIONAL - To overwrite the tag to use"
116116
}
117117
}

0 commit comments

Comments
 (0)