diff --git a/.gitlab/validate.sh b/.gitlab/validate.sh index daf827c2c82b2705dfca38e94b15e2a7ac6b3dc6..d25daba994cb5bc21d6af0533c53fac07bbd66a1 100755 --- a/.gitlab/validate.sh +++ b/.gitlab/validate.sh @@ -34,8 +34,9 @@ if [[ -z $SONARQUBE_LOGIN ]]; then fi if [[ $METRIC == "BUG" ]]; then - BUG=`curl -u $TOKEN: -X GET "https://sonarqube.inria.fr/sonarqube/api/measures/component?component=${CI_PROJECT_NAMESPACE}%3A${CI_PROJECT_NAME}&pullRequest=${CI_MERGE_REQUEST_IID}&metricKeys=new_bugs" |jq '.component.measures[0].period.value' | sed -e "s#\"##g"` - if [[ $BUG > 0 ]]; then + BUG=`curl -u $SONARQUBE_LOGIN: -X GET "https://sonarqube.inria.fr/sonarqube/api/measures/component?component=${CI_PROJECT_NAMESPACE}%3A${CI_PROJECT_NAME}&pullRequest=${CI_MERGE_REQUEST_IID}&metricKeys=new_bugs" |jq '.component.measures[0].period.value' | sed -e "s#\"##g"` + echo "BUG=$BUG" + if [[ $BUG -gt 0 ]]; then echo "%{BUG} new bugs detected by Sonarqube -> Failure." exit 1 else @@ -43,11 +44,12 @@ if [[ $METRIC == "BUG" ]]; then exit 0 fi elif [[ $METRIC == "COVERAGE" ]]; then - COV=`curl -u $TOKEN: -X GET "https://sonarqube.inria.fr/sonarqube/api/measures/component?component=${CI_PROJECT_NAMESPACE}%3A${CI_PROJECT_NAME}&pullRequest=${CI_MERGE_REQUEST_IID}&metricKeys=new_coverage" |jq '.component.measures[0].period.value' | sed -e "s#\"##g"` + COV=`curl -u $SONARQUBE_LOGIN: -X GET "https://sonarqube.inria.fr/sonarqube/api/measures/component?component=${CI_PROJECT_NAMESPACE}%3A${CI_PROJECT_NAME}&pullRequest=${CI_MERGE_REQUEST_IID}&metricKeys=new_coverage" |jq '.component.measures[0].period.value' | sed -e "s#\"##g" | cut -d "." -f 1` + echo "COV=$COV" if [[ $COV == "null" || -z $COV ]]; then echo "Coverage is empty, certainly that there are no lines of new code (considered during the analysis) to compare -> Success." else - if [[ $COV < 80 ]]; then + if [[ $COV -lt 80 ]]; then echo "Coverage on new lines is ${COV}%, which is < 80% -> Failure." exit 1 else diff --git a/README.org b/README.org index 478044202e3a049d16af456a8e68415cecfa09ef..c1a82cc04514708dec0346576ac598669689e3ca 100644 --- a/README.org +++ b/README.org @@ -25,9 +25,6 @@ provide critical path length. git clone git@gitlab.inria.fr:solverstack/hqr.git #+end_src - Last releases of Chameleon are hosted on the [[https://gforge.inria.fr/frs/?group_id=2884][gforge.inria.fr]] for - now. Future releases will be available on this gitlab project. - # * Documentation # ** User guide # The user guide is available directly in the sources as emacs