Commit 432f3602 by Hugo Häggmark Committed by GitHub

Build: Reports times and outcomes from CircleCI jobs (#20474)

* Build: Adds start and stop job

* WIP: Testing passing env variables

* Fix: Fixes shellcheck errors

* WIP: Uses $BASH_ENV

* WIP: bash update

* WIP: adds stats echo

* WIP: Adds reporting

* Fix: Fixes reporting

* Fix: Fixes reporting

* Refactor: Adds outcomes and timing to build-fast-frontend

* Build: Adds stats to all jobs

* Fix: Fixes invalid yml

* Refactor: Adds stats to integration tests

* Refactor: Run stats on master only
parent a30cc9e6
#!/bin/bash
# shellcheck source=./scripts/helpers/exit-if-fail.sh
source "$(dirname "$0")/helpers/exit-if-fail.sh"
echo -e "Report build times and build outcome"
start=$GF_JOB_START
runtime=$((($(date +%s%N) - start)/1000000))
echo -e "The job $CIRCLE_JOB took $runtime (ms)"
if [ "${CIRCLE_BRANCH}" == "master" ]; then
exit_if_fail ./scripts/ci-metrics-publisher.sh "grafana.ci-buildtimes.$CIRCLE_JOB=$runtime"
exit_if_fail ./scripts/ci-metrics-publisher.sh "grafana.ci-buildoutcome.$CIRCLE_JOB=0"
fi
#!/bin/bash
echo -e "Collecting job start date"
start=$(date +%s%N)
echo "export GF_JOB_START=$start" >> "$BASH_ENV"
#!/bin/bash
# shellcheck source=./scripts/helpers/exit-if-fail.sh
source "$(dirname "$0")/helpers/exit-if-fail.sh"
echo -e "Report build times and build outcome"
start=$GF_JOB_START
runtime=$((($(date +%s%N) - start)/1000000))
echo -e "The job $CIRCLE_JOB took $runtime (ms)"
if [ "${CIRCLE_BRANCH}" == "master" ]; then
exit_if_fail ./scripts/ci-metrics-publisher.sh "grafana.ci-buildtimes.$CIRCLE_JOB=$runtime"
exit_if_fail ./scripts/ci-metrics-publisher.sh "grafana.ci-buildoutcome.$CIRCLE_JOB=1"
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment