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 2019/05/28 19:58:58 UTC

[sling-whiteboard] branch master updated: Updating to support docs make the JDK a build parameter

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


The following commit(s) were added to refs/heads/master by this push:
     new cde8471  Updating to support docs make the JDK a build parameter
     new 846a865  Merge branch 'master' of github.com:apache/sling-whiteboard
cde8471 is described below

commit cde84717f28020708fa126c303495c5537dddb54
Author: Dan Klco <dk...@apache.org>
AuthorDate: Tue May 28 14:58:42 2019 -0500

    Updating to support docs make the JDK a build parameter
---
 release-validator/Dockerfile |  8 ++++++--
 release-validator/README.md  |  5 ++---
 release-validator/init.sh    |  2 +-
 release-validator/run.sh     | 24 +++++++++++++-----------
 4 files changed, 22 insertions(+), 17 deletions(-)

diff --git a/release-validator/Dockerfile b/release-validator/Dockerfile
index cce307d..9276e14 100644
--- a/release-validator/Dockerfile
+++ b/release-validator/Dockerfile
@@ -1,12 +1,16 @@
 FROM centos
 
 WORKDIR /opt
+ENV JDK_RPM=jdk-8u211-linux-x64.rpm
 
 ADD init.sh .
-ADD *.rpm .
+ADD $JDK_RPM .
 RUN /bin/bash init.sh
 
 EXPOSE 8080
 
 ADD run.sh .
-ENTRYPOINT /bin/bash run.sh
\ No newline at end of file
+CMD  /bin/bash run.sh
+
+ENTRYPOINT ["/bin/bash","run.sh"]
+CMD ["0"]
\ No newline at end of file
diff --git a/release-validator/README.md b/release-validator/README.md
index ca2311a..6008b24 100644
--- a/release-validator/README.md
+++ b/release-validator/README.md
@@ -22,16 +22,15 @@ into the project root directory, then run:
 
 To run the docker container run:
 
-    docker run -e RELEASE_ID=[A_RELEASE_NUMBER] sling-check-release
+    docker run sling-check-release [A_RELEASE_NUMBER]
 
 To keep the docker container up for 10 minutes to ensure the bundle is installed and working, execute:
 
-    docker run -e RELEASE_ID=[A_RELEASE_NUMBER] -e KEEP_RUNNING=true -P sling-check-release
+    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
- - **RELEASE_ID** - The ID of the release to validate, required
  - **RUN_TIMEOUT** - The amount of time for the Sling instance to be left running, default is 10m
diff --git a/release-validator/init.sh b/release-validator/init.sh
index ad1b376..33b93be 100644
--- a/release-validator/init.sh
+++ b/release-validator/init.sh
@@ -5,7 +5,7 @@ yum install epel-release -y
 yum install -y wget openssl git jq which
 
 echo "Installing Java..."
-yum localinstall -y *.rpm
+yum localinstall -y $JDK_RPM
 
 echo "Configuring JAVA_HOME..."
 JAVA_VERSION=$(ls /usr/java/ | grep jdk)
diff --git a/release-validator/run.sh b/release-validator/run.sh
index beaecd2..fe2a4e6 100644
--- a/release-validator/run.sh
+++ b/release-validator/run.sh
@@ -15,6 +15,7 @@ prints() {
   printf "\n\n$STARTCOLOR%b$ENDCOLOR" "$1\n";
 }
 
+RELEASE_ID=$1
 mkdir tmp
 
 prints "Starting Validation for Apache Sling Release #$RELEASE_ID" "info"
@@ -98,20 +99,14 @@ prints "Build(s) Successful!" "success"
 if [ "$HAS_BUNDLE" = true ]; then
   prints "Bundles found, starting Apache Sling Starter..." "info"
   
-  mkdir run
-  
-  echo "Downloading Sling Starter..."
-  mvn/bin/mvn -q dependency:get -DremoteRepositories=https://repository.apache.org/content/groups/snapshots -DgroupId=org.apache.sling -DartifactId=org.apache.sling.starter -Dversion=LATEST -Dtransitive=false
-  mvn/bin/mvn -q dependency:copy -Dartifact=org.apache.sling:org.apache.sling.starter:LATEST -DoutputDirectory=run
-  
   echo "Starting Sling Starter..."
-
-  mkdir -p run/sling/logs
+  git clone https://github.com/apache/sling-org-apache-sling-launchpad-testing.git run
+  mkdir -p run/target/sling/logs
   (
     (
-      java -server -Xmx1024m -XX:MaxPermSize=256M -Djava.awt.headless=true -jar run/*.jar  -p 8080 -c run/sling &
-    echo $! > app.pid
-    ) >> run/sling/logs/stdout.log 2>&1
+      mvn/bin/mvn -q -f run/pom.xml clean install -Dlaunchpad.keep.running=true -Dhttp.port=8080 -Ddebug &
+      echo $! > app.pid
+    ) >> run/target/sling/logs/stdout.log 2>&1
   ) &
   
   echo "Waiting for Sling to fully start..."
@@ -124,6 +119,9 @@ if [ "$HAS_BUNDLE" = true ]; then
     if [[ "$RESP" == *"Do not remove this comment, used for Starter integration tests"* ]]; then
       prints "Sling Starter started!" "success"
       let STARTED=true
+      echo "Installing test services..."
+      ls integration-tests/*
+      curl -u admin:admin -F action=install -F bundlestart=true -F refreshPackages=true -F bundlestartlevel=20 -F bundlefile=@"integration-tests/org.apache.sling.launchpad.test-services*.jar" http://127.0.0.1:8080/system/console/bundles || exit 1
       break
     else
       echo "Not yet started..."
@@ -186,6 +184,10 @@ if [ "$HAS_BUNDLE" = true ]; then
     prints "Some bundles failed to start" "error"
   fi
   
+  prints "Running Integration Tests" "info"
+  git clone https://github.com/apache/sling-org-apache-sling-launchpad-integration-tests.git integration-tests
+  mvn/bin/mvn test -f integration-tests/pom.xml -Dhttp.port=8080 || exit 1
+  
   if [[ "$KEEP_RUNNING" == "true" ]]; then
     TIMEOUT="${RUN_TIMEOUT:=10m}"
   	echo "Leaving Sling Starter running for $TIMEOUT for testing..."