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:08 UTC

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

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"