fix(notifications-catalog): Add nil check for on-deployed trigger (#15363)

Signed-off-by: Fs02 <surya.asriadie@gmail.com>
Co-authored-by: pasha-codefresh <pavel@codefresh.io>
This commit is contained in:
Surya Asriadie 2023-09-06 21:57:16 +09:00 committed by GitHub
parent ec2d3f6922
commit 0de579dd34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -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:

View file

@ -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