From: Matthew Fernandez Date: Wed, 16 Feb 2022 19:48:40 +0000 (+1100) Subject: CI: [nfc] abbreviate metrics file creation X-Git-Tag: 3.0.0~25^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=87d4e0b4059ae6a29aa28adc69d31ea861923412;p=graphviz CI: [nfc] abbreviate metrics file creation Slightly more efficient and concise. --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 616e94ced..1cfae2697 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -39,8 +39,7 @@ portable-source: script: - logfile=`mktemp` - ci/build.sh |& tee $logfile - - echo "$CI_JOB_NAME-warnings `grep -c 'warning:' $logfile`" > metrics.txt - - cat metrics.txt + - echo "$CI_JOB_NAME-warnings `grep -c 'warning:' $logfile`" | tee metrics.txt artifacts: when: on_success expire_in: 1 week @@ -60,8 +59,7 @@ portable-source: script: - logfile=`mktemp` - ci/build.sh |& tee $logfile - - echo "$CI_JOB_NAME-warnings `grep -c 'warning:' $logfile`" > metrics.txt - - cat metrics.txt + - echo "$CI_JOB_NAME-warnings `grep -c 'warning:' $logfile`" | tee metrics.txt artifacts: when: on_success expire_in: 1 week @@ -95,8 +93,7 @@ portable-source: - export PATH="/usr/local/opt/bison/bin:$PATH" - logfile=`mktemp` - ci/build.sh 2>&1 | tee $logfile - - echo "$CI_JOB_NAME-warnings `grep -c 'warning:' $logfile`" > metrics.txt - - cat metrics.txt + - echo "$CI_JOB_NAME-warnings `grep -c 'warning:' $logfile`" | tee metrics.txt artifacts: when: on_success expire_in: 1 week @@ -148,8 +145,7 @@ portable-source: - windows/bin/setup-build-utilities.ps1 2>&1 | tee $logfile - python ci/build_windows.py --build-system $env:build_system --platform $Env:project_platform --configuration $env:configuration 2>&1 | tee -a $logfile - $warnings_count = (Select-String -Pattern " warning " -Path $logfile).length - - echo "$CI_JOB_NAME-warnings $warnings_count" > metrics.txt - - cat metrics.txt + - echo "$CI_JOB_NAME-warnings $warnings_count" | tee metrics.txt - python gen_version.py --output GRAPHVIZ_VERSION # Package - $Env:GV_VERSION=$( cat GRAPHVIZ_VERSION ) @@ -422,8 +418,7 @@ out-of-source-build: script: - logfile=`mktemp` - ci/out-of-source-build.sh |& tee $logfile - - echo "$CI_JOB_NAME-warnings `grep -c 'warning:' $logfile`" > metrics.txt - - cat metrics.txt + - echo "$CI_JOB_NAME-warnings `grep -c 'warning:' $logfile`" | tee metrics.txt needs: - job: docker_build_ubuntu-21.10 artifacts: false @@ -1496,8 +1491,7 @@ lint_pylint: script: - logfile=`mktemp` - python3 -m pylint --rcfile=.pylintrc `find . -name '*.py' | xargs` --exit-zero |& tee $logfile - - echo "$CI_JOB_NAME-warnings `egrep -c '\<[CRWEF][[:digit:]]{4}\>' $logfile`" > metrics.txt - - cat metrics.txt + - echo "$CI_JOB_NAME-warnings `egrep -c '\<[CRWEF][[:digit:]]{4}\>' $logfile`" | tee metrics.txt - python3 -m pylint --rcfile=.pylintrc --disable=fixme `find . -name '*.py' | xargs` artifacts: when: on_success