Skip to content

Commit

Permalink
fix(notifications-catalog): Add nil check for on-deployed trigger (#1…
Browse files Browse the repository at this point in the history
…5363)

Signed-off-by: Fs02 <[email protected]>
Co-authored-by: pasha-codefresh <[email protected]>
  • Loading branch information
Fs02 and pasha-codefresh authored Sep 6, 2023
1 parent ec2d3f6 commit 0de579d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions notifications_catalog/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -499,11 +499,11 @@ data:
when: app.metadata.deletionTimestamp != nil
trigger.on-deployed: |
- description: Application is synced and healthy. Triggered once per commit.
oncePer: app.status.operationState.syncResult.revision
oncePer: app.status.operationState?.syncResult?.revision
send:
- app-deployed
when: app.status.operationState.phase in ['Succeeded'] and app.status.health.status
== 'Healthy'
when: app.status.operationState != nil and app.status.operationState.phase in ['Succeeded']
and app.status.health.status == 'Healthy'
trigger.on-health-degraded: |
- description: Application has degraded
send:
Expand Down
4 changes: 2 additions & 2 deletions notifications_catalog/triggers/on-deployed.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- when: app.status.operationState.phase in ['Succeeded'] and app.status.health.status == 'Healthy'
- when: app.status.operationState != nil and app.status.operationState.phase in ['Succeeded'] and app.status.health.status == 'Healthy'
description: Application is synced and healthy. Triggered once per commit.
send: [app-deployed]
oncePer: app.status.operationState.syncResult.revision
oncePer: app.status.operationState?.syncResult?.revision

0 comments on commit 0de579d

Please sign in to comment.