From 6e419378bc46dd37d99cb64a289d47f9b686bfd7 Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Fri, 28 Aug 2020 14:51:45 +0200 Subject: [PATCH] Add a metrics report with warnings to CI --- .gitlab-ci.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4172e3575..15fd0b8ce 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,7 +27,11 @@ portable-source: .build_template: &rpm_build_definition stage: build script: - - ci/build.sh + - logfile=`mktemp` + - ci/build.sh |& tee $logfile + - echo "$CI_JOB_NAME-warnings `grep -c 'warning:' $logfile`" > metrics.txt + - rm $logfile + - cat metrics.txt artifacts: when: on_success expire_in: 1 week @@ -35,13 +39,19 @@ portable-source: - Packages/*/*/*/*/*/*.rpm - Packages/*/*/*/*/*.rpm - Metadata/*/*/*/configure.log + reports: + metrics: metrics.txt except: - tags .build_template: &deb_build_definition stage: build script: - - ci/build.sh + - logfile=`mktemp` + - ci/build.sh |& tee $logfile + - echo "$CI_JOB_NAME-warnings `grep -c 'warning:' $logfile`" > metrics.txt + - rm $logfile + - cat metrics.txt artifacts: when: on_success expire_in: 1 week @@ -49,6 +59,8 @@ portable-source: - Packages/*/*/*/*/*/*deb - Packages/*/*/*/*/*.gz - Metadata/*/*/*/configure.log + reports: + metrics: metrics.txt except: - tags -- 2.40.0