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-whiteboard.git

commit 29118bbc75a1f9cb0343ad55bfeaf0a7d499efdd
Author: Dan Klco <[email protected]>
AuthorDate: Fri Aug 23 14:48:26 2019 -0400

    Updating to provide more details as to why the CI check failed
---
 release-validator/README.md                        |  6 +--
 .../checks-available/001-check-ci-status           | 49 ++++++++++++----------
 release-validator/run.sh                           |  2 +-
 3 files changed, 31 insertions(+), 26 deletions(-)

diff --git a/release-validator/README.md b/release-validator/README.md
index 30402b6..bdd25d0 100644
--- a/release-validator/README.md
+++ b/release-validator/README.md
@@ -1,6 +1,6 @@
 # Release Validator
 
-A docker container for validating Apache Sling releases using the release ID. 
+A docker container for validating Apache Sling releases using the release ID.
 
 This container will:
 
@@ -26,10 +26,10 @@ To run the docker container run:
 To keep the docker container up for 10 minutes to ensure the bundle is 
installed and working, execute:
 
     docker run -e KEEP_RUNNING=true -P sling-check-release [A_RELEASE_NUMBER]
-    
+
 ## Environment Variables
 
 The following environment variables are supported:
 
- - **KEEP_RUNNING** - If set to true, the Sling instace will be left running, 
default is false
+ - **KEEP_RUNNING** - If set to true, the Sling instance will be left running, 
default is false
  - **RUN_TIMEOUT** - The amount of time for the Sling instance to be left 
running, default is 10m
diff --git a/release-validator/checks-available/001-check-ci-status 
b/release-validator/checks-available/001-check-ci-status
index 4d2612a..8b75501 100755
--- a/release-validator/checks-available/001-check-ci-status
+++ b/release-validator/checks-available/001-check-ci-status
@@ -1,39 +1,44 @@
 #!/bin/sh
 
-
 pom_files=$(find $RELEASE_FOLDER -name '*.pom')
 
 failed=0
 unknown=0
+
+echo ""
 for pom_file in ${pom_files}; do
-    artifactId=$(xmllint --xpath 
"/*[local-name()='project']/*[local-name()='artifactId']/text()" ${pom_file})
-    version=$(xmllint --xpath 
"/*[local-name()='project']/*[local-name()='version']/text()" ${pom_file})
-    repo_name="${artifactId//\./-}"
-    if [[ $repo_name != sling-* ]]; then
-        repo_name="sling-${repo_name}"
-    fi
-    echo -n "Status for ${artifactId} ${version}: "
-    status=$(curl --silent -H 'Accept: application/vnd.github.v3+json' \
-        
"https://api.github.com/repos/apache/${repo_name}/commits/${artifactId}-${version}/status";
 | \
-        jq --raw-output '.state')
-    echo $status
-    case $status in
-        "pending")
-            unknown=1
-            ;;
-        "failure")
-            failed=1
-            ;;
-    esac
+  artifactId=$(xmllint --xpath 
"/*[local-name()='project']/*[local-name()='artifactId']/text()" ${pom_file})
+  version=$(xmllint --xpath 
"/*[local-name()='project']/*[local-name()='version']/text()" ${pom_file})
+  repo_name="${artifactId//\./-}"
+  if [[ $repo_name != sling-* ]]; then
+    repo_name="sling-${repo_name}"
+  fi
+  echo -n "STATUS: ${artifactId} ${version}: "
+  resp=$(curl --silent -H 'Accept: application/vnd.github.v3+json' \
+      
"https://api.github.com/repos/apache/${repo_name}/commits/${artifactId}-${version}/status";)
+  status=$(echo $resp | jq --raw-output '.state')
+  echo $status
+  case $status in
+    "pending")
+      unknown=1
+      ;;
+    "failure")
+      failed=1
+      ;;
+  esac
+  if [[ $status != "success" ]]; then
     echo "See 
https://github.com/apache/${repo_name}/commits/${artifactId}-${version} for 
details"
+    echo $resp | jq -r '.statuses[] | "Additional Information: \"" + 
.description + "\" See: " + .target_url'
+  fi
+  echo ""
 done
 
 if [ $failed -eq 1 ]; then
-    exit 1
+  exit 1
 fi
 
 if [ $unknown -eq 1 ]; then
-    exit 129
+  exit 129
 fi
 
 exit 0
diff --git a/release-validator/run.sh b/release-validator/run.sh
index 5cf0399..d456915 100644
--- a/release-validator/run.sh
+++ b/release-validator/run.sh
@@ -62,7 +62,7 @@ mkdir ${RELEASE_FOLDER} 2>/dev/null
 
 # Download the release artifacts
 prints "Downloading release artifacts" "info"
-try wget -e "robots=off" --wait 1 -nv -r -np "--reject=html,index.html.tmp" \
+try wget -e "robots=off" -nv -r -np "--reject=html,index.html.tmp" \
   "--follow-tags=" -P "$RELEASE_FOLDER" -nH "--cut-dirs=3" \
   
"https://repository.apache.org/content/repositories/orgapachesling-${RELEASE_ID}/org/apache/sling/";
 

Reply via email to