You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by dk...@apache.org on 2020/08/22 22:13:06 UTC

[sling-aggregator] branch master updated (6875916 -> 70e945a)

This is an automated email from the ASF dual-hosted git repository.

dklco pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/sling-aggregator.git.


    from 6875916  default.xml: refresh repository list
     new 6c425d6  Adding SonarQube badges for SLING-9682
     new 70e945a  Updating to use badges from ci-build.apache.org for SLING-9681

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 add-badges.sh | 25 +++++++++++++++++--------
 1 file changed, 17 insertions(+), 8 deletions(-)


[sling-aggregator] 02/02: Updating to use badges from ci-build.apache.org for SLING-9681

Posted by dk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dklco pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-aggregator.git

commit 70e945ab661fd784b9f80055c24543bd33dba131
Author: Dan Klco <dk...@apache.org>
AuthorDate: Sat Aug 22 18:12:54 2020 -0400

    Updating to use badges from ci-build.apache.org for SLING-9681
---
 add-badges.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/add-badges.sh b/add-badges.sh
index ac6fecf..ab0f47e 100755
--- a/add-badges.sh
+++ b/add-badges.sh
@@ -125,19 +125,19 @@ function update_badges () {
         prepend
     fi
     
-    TEST_CONTENTS=$(curl -L https://img.shields.io/jenkins/t/https/builds.apache.org/job/Sling/job/sling-$REPO_NAME/job/master.svg)
-    if [[ $TEST_CONTENTS = *"inaccessible"* || $TEST_CONTENTS = *"invalid"* ]]; then
+    TEST_RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" "https://img.shields.io/jenkins/tests.svg?jobUrl=https://ci-builds.apache.org/job/Sling/job/modules/job/sling-$REPO_NAME/job/master/")
+    if [ "$TEST_RESPONSE" = "404" ]; then
         echo "No tests found for $REPO_NAME"
     else
         echo "Adding test badge for $REPO_NAME"
-        LINE=" [![Test Status](https://img.shields.io/jenkins/t/https/builds.apache.org/job/Sling/job/sling-$REPO_NAME/job/master.svg)](https://builds.apache.org/job/Sling/job/sling-$REPO_NAME/job/master/test_results_analyzer/)"
+        LINE=" ![Test Status](https://img.shields.io/jenkins/tests.svg?jobUrl=https://ci-builds.apache.org/job/Sling/job/modules/job/sling-$REPO_NAME/job/master/)](https://ci-builds.apache.org/job/Sling/job/modules/job/sling-$REPO_NAME/job/master/test/?width=800&height=600)"
         prepend
     fi
     
-    BUILD_RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" https://builds.apache.org/job/Sling/job/sling-$REPO_NAME/)
+    BUILD_RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" https://ci-builds.apache.org/job/Sling/job/modules/job/sling-$REPO_NAME/job/master/badge/icon)
     if [ "$BUILD_RESPONSE" != "404" ]; then
         echo "Adding build badge for $REPO_NAME"
-        LINE=" [![Build Status](https://builds.apache.org/buildStatus/icon?job=Sling/sling-$REPO_NAME/master)](https://builds.apache.org/job/Sling/job/sling-$REPO_NAME/job/master)"
+        LINE="  [![Build Status](https://ci-builds.apache.org/job/Sling/job/modules/job/sling-$REPO_NAME/job/master/badge/icon)](https://ci-builds.apache.org/job/Sling/job/modules/job/sling-$REPO_NAME/job/master/)"
         prepend
     else
         echo "No build found for $REPO_NAME"


[sling-aggregator] 01/02: Adding SonarQube badges for SLING-9682

Posted by dk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dklco pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-aggregator.git

commit 6c425d645d6ea2786135dd33b8c5c564098a60a9
Author: Dan Klco <dk...@apache.org>
AuthorDate: Sat Aug 22 18:12:12 2020 -0400

    Adding SonarQube badges for SLING-9682
---
 add-badges.sh | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/add-badges.sh b/add-badges.sh
index 9e180d8..ac6fecf 100755
--- a/add-badges.sh
+++ b/add-badges.sh
@@ -107,12 +107,21 @@ function update_badges () {
         fi
     fi
     
-    COVERAGE_CONTENTS=$(curl -L https://img.shields.io/jenkins/c/https/builds.apache.org/job/Sling/job/sling-$REPO_NAME/job/master.svg)
-    if [[ $COVERAGE_CONTENTS = *"job or coverage not found"* ]]; then
+    STATUS_CONTENTS=$(curl -L "https://sonarcloud.io/api/project_badges/measure?project=apache_sling-$REPO_NAME&metric=alert_status")
+    if [[ $STATUS_CONTENTS = *"Measure has not been found"* ]]; then
+        echo "No sonarcloud status found for $REPO_NAME"
+    else
+        echo "Adding sonarcloud status badge for $REPO_NAME"
+        LINE=" [![Sonarcloud Status](https://sonarcloud.io/api/project_badges/measure?project=apache_sling-$REPO_NAME&metric=alert_status)](https://sonarcloud.io/dashboard?id=apache_sling-$REPO_NAME)"
+        prepend
+    fi
+    
+    COVERAGE_CONTENTS=$(curl -L "https://sonarcloud.io/api/project_badges/measure?project=apache_sling-$REPO_NAME&metric=coverage")
+    if [[ $COVERAGE_CONTENTS = *"Measure has not been found"* ]]; then
         echo "No coverage reports found for $REPO_NAME"
     else
         echo "Adding coverage badge for $REPO_NAME"
-        LINE=" [![Coverage Status](https://img.shields.io/jenkins/c/https/builds.apache.org/job/Sling/job/sling-$REPO_NAME/job/master.svg)](https://builds.apache.org/job/Sling/job/sling-$REPO_NAME/job/master)"
+        LINE=" [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=apache_sling-$REPO_NAME&metric=coverage)](https://sonarcloud.io/dashboard?id=apache_sling-$REPO_NAME)"
         prepend
     fi