Back to home page

EIC code displayed by LXR

 
 

    


Warning, /acts/CI/check_doxygen is written in an unsupported language. File is not indexed.

0001 #! /usr/bin/env bash
0002 
0003 # abort on error
0004 set -ex
0005 
0006 # check for correct number of arguments
0007 if [ $# -ne 1 ]
0008 then
0009     echo "wrong number of arguments"
0010     echo "usage: check_doxygen <doxygen_log_file>"
0011     exit 1
0012 fi
0013 
0014 # check for required environment variables
0015 : ${gitlabToken:?"'gitlabToken' not set or empty"}
0016 : ${gitlabTargetNamespace:?"'gitlabTargetNamespace' not set or empty"}
0017 : ${gitlabTargetRepoName:?"'gitlabTargetRepoName' not set or empty"}
0018 : ${gitlabMergeRequestId:?"'gitlabMergeRequestId' not set or empty"}
0019 : ${BUILD_URL:?"'BUILD_URL' not set or empty"}
0020 
0021 # parse doxygen logfile
0022 DOXY_LOG=$1
0023 ARTEFACT=$(basename $DOXY_LOG)
0024 if [ -e $DOXY_LOG ]
0025 then
0026     WARNINGS=`grep -i warning $DOXY_LOG | wc -l`
0027     ERRORS=`grep -i error $DOXY_LOG | wc -l`
0028     COMMENT="doxygen output:<br />$ERRORS errors<br />$WARNINGS warnings<br />full doxygen output can be found [here]($BUILD_URL/artifact/$ARTEFACT)"
0029 else
0030     COMMENT="<b>FATAL</b>: no logfile from doxygen found"
0031 fi
0032 
0033 # publish result as comment
0034 ./comment_merge_request add "$COMMENT" --project $gitlabTargetNamespace/$gitlabTargetRepoName --merge-request-id $gitlabMergeRequestId --token $gitlabToken