Skip to content
This repository has been archived by the owner on May 26, 2021. It is now read-only.

Commit

Permalink
sets summary states better
Browse files Browse the repository at this point in the history
  • Loading branch information
jghibiki committed Apr 10, 2019
1 parent a420770 commit e919f9c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
],

"failure_state": "failed",
"success_state": "ok",
"pending_state": "pending",

"notifications": [
{
Expand Down
5 changes: 3 additions & 2 deletions server/sydney.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,9 @@ def notify_state_change(environment, pipeline, step, state):
# set parent to new state
if pipelines["failure_state"] != parent["state"]:
notify_state_change(env["name"], parent_pipeline, parent["name"], pipelines["failure_state"])


elif pipelines["pending_state"] in child_states:
if pipelines["pending_state"] != parent["state"]:
notify_state_change(env["name"], parent_pipeline, parent["name"], pipelines["pending_state"])
else:
#pick most common state
new_state = max(child_states, key=child_states.count)
Expand Down

0 comments on commit e919f9c

Please sign in to comment.