Skip to content

Commit

Permalink
update reports to display deploy warning
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Stokes <battlemidget@users.noreply.github.com>
  • Loading branch information
Adam Stokes committed Jul 31, 2020
1 parent 072cbf2 commit 2e6508b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
10 changes: 8 additions & 2 deletions bin/report
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,11 @@ def _gen_metadata():
test_result, _, obj["build_endtime"] = get_file_prefix("result-", files)
if not obj["build_endtime"]:
continue

obj["test_result"] = True if test_result == "True" else False

deploy_result, _, _ = get_file_prefix("deployresult-", files)
obj["deploy_result"] = True if deploy_result == "True" else False

if "validate" not in job_name:
continue

Expand All @@ -181,10 +183,14 @@ def _gen_metadata():
if job_name not in db:
db[job_name] = {}

if "test_result" not in obj:
if "test_result" not in obj and "deploy_result" not in obj:
result_bg_class = "bg-light"
result_btn_class = "btn-light"
result_bg_color = "#d4dee8!important;"
elif obj["deploy_result"] and not obj["test_result"]:
result_bg_class = "bg-warning"
result_btn_class = "btn-warning"
result_bg_color = "##FFFF00!important;"
elif not obj["test_result"]:
result_bg_class = "bg-danger"
result_btn_class = "btn-danger"
Expand Down
3 changes: 3 additions & 0 deletions ci.bash
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ function ci::run
kv::set "deploy_result" "True"
kv::set "deploy_endtime" "$(timestamp)"

touch "meta/deployresult-True"
python bin/s3 cp "meta/deployresult-True" "meta/deployresult-True"

test::execute result

kv::set "build_endtime" "$(timestamp)"
Expand Down
4 changes: 4 additions & 0 deletions jobs/templates/_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
background-color: #ff0018!important;
color: #000000;
}
.bg-warning, .badge-warning {
background-color: ##FFFF00!important;
color: #000000;
}
.bg-light, .badge-light {
background-color: #d4dee8!important;
color: #000000;
Expand Down

0 comments on commit 2e6508b

Please sign in to comment.