Skip to content

Commit

Permalink
Merge pull request #2023 from ThalesSiliconSecurity/ci-report-env-fai…
Browse files Browse the repository at this point in the history
…lures

ci: report environment failures in dashboard
  • Loading branch information
MikeOpenHWGroup authored Aug 14, 2023
2 parents f555300 + a499a61 commit 26f1bcd
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .gitlab-ci/cva6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ stages:
- smoke tests
- verif tests
- backend tests
- find failures
- report

.verif_test:
Expand Down Expand Up @@ -603,6 +604,24 @@ code_coverage-report:
artifacts:
expire_in: 3 week

check gitlab jobs status:
stage: find failures
tags: [$TAGS_RUNNER]
rules:
- if: '$DASHBOARD_URL'
when: on_failure
- when: never
variables:
DASHBOARD_JOB_TITLE: "Environment check"
DASHBOARD_JOB_DESCRIPTION: "Detect environment issues"
DASHBOARD_SORT_INDEX: 0
DASHBOARD_JOB_CATEGORY: "Environment"
script:
- rm -rf artifacts/
- mkdir -p artifacts/reports
- python3 .gitlab-ci/scripts/report_envfail.py
artifacts: *artifacts

merge reports:
stage: report
tags: [$TAGS_RUNNER]
Expand Down
17 changes: 17 additions & 0 deletions .gitlab-ci/scripts/report_envfail.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2023 Thales Silicon Security
#
# Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0
# You may obtain a copy of the License at https://solderpad.org/licenses/
#
# Original Author: Côme ALLART - Thales

import report_builder as rb

metric = rb.TableStatusMetric('')
metric.add_fail('Environment failure detected. Some reports might be missing')

report = rb.Report()
report.add_metric(metric)
report.dump()

0 comments on commit 26f1bcd

Please sign in to comment.