You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2022/02/15 14:08:09 UTC

[myfaces-homepage] branch tobago-vm updated: * update java distr. * update tomcat * user curl instead of ansible

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

lofwyr pushed a commit to branch tobago-vm
in repository https://gitbox.apache.org/repos/asf/myfaces-homepage.git


The following commit(s) were added to refs/heads/tobago-vm by this push:
     new df77ae8  * update java distr. * update tomcat * user curl instead of ansible
df77ae8 is described below

commit df77ae8a646708f37664af24400acb08baf7649b
Author: Udo Schnurpfeil <ud...@irian.eu>
AuthorDate: Tue Feb 15 15:07:55 2022 +0100

    * update java distr.
    * update tomcat
    * user curl instead of ansible
    
    run only the current snapshots
    
    issue: TOBAGO-2112
---
 tobago/tobago-vm/docker-compose.yml                | 24 ----------------------
 tobago/tobago-vm/tomcat/Dockerfile                 |  9 +++-----
 tobago/tobago-vm/tomcat/download-deploy-and-run.sh | 13 +++++++-----
 3 files changed, 11 insertions(+), 35 deletions(-)

diff --git a/tobago/tobago-vm/docker-compose.yml b/tobago/tobago-vm/docker-compose.yml
index d43c280..6773bba 100644
--- a/tobago/tobago-vm/docker-compose.yml
+++ b/tobago/tobago-vm/docker-compose.yml
@@ -59,8 +59,6 @@ services:
 #    environment:
 #      - TOBAGO_VERSION=5.0.0
 #      - CONTEXT_PATH=demo-5-release
-#    volumes:
-#      - ~/tobago-vm/artifacts:/opt/docker/artifacts
 #    ports:
 #      - "8500:8080"
 #    logging:
@@ -73,8 +71,6 @@ services:
 #      - TOBAGO_VERSION=5.0.0
 #      - STAGING_NUMBER=1196
 #      - CONTEXT_PATH=demo-5-staging
-#    volumes:
-#      - ~/tobago-vm/artifacts:/opt/docker/artifacts
 #    ports:
 #      - "8501:8080"
 #    logging:
@@ -86,8 +82,6 @@ services:
     environment:
       - TOBAGO_VERSION=5.1.0-SNAPSHOT
       - CONTEXT_PATH=demo-5-snapshot
-    volumes:
-      - ~/tobago-vm/artifacts:/opt/docker/artifacts
     ports:
       - "8502:8080"
     logging:
@@ -99,8 +93,6 @@ services:
 #    environment:
 #      - TOBAGO_VERSION=4.5.4
 #      - CONTEXT_PATH=demo-4-release
-#    volumes:
-#      - ~/tobago-vm/artifacts:/opt/docker/artifacts
 #    ports:
 #      - "8400:8080"
 #    logging:
@@ -113,8 +105,6 @@ services:
 #      - TOBAGO_VERSION=4.5.4
 #      - STAGING_NUMBER=1191
 #      - CONTEXT_PATH=demo-4-staging
-#    volumes:
-#      - ~/tobago-vm/artifacts:/opt/docker/artifacts
 #    ports:
 #      - "8401:8080"
 #    logging:
@@ -126,8 +116,6 @@ services:
     environment:
       - TOBAGO_VERSION=4.5.5-SNAPSHOT
       - CONTEXT_PATH=demo-4-snapshot
-    volumes:
-      - ~/tobago-vm/artifacts:/opt/docker/artifacts
     ports:
       - "8402:8080"
     logging:
@@ -139,8 +127,6 @@ services:
 #    environment:
 #      - TOBAGO_VERSION=3.1.1
 #      - CONTEXT_PATH=demo-3-release
-#    volumes:
-#      - ~/tobago-vm/artifacts:/opt/docker/artifacts
 #    ports:
 #      - "8300:8080"
 #    logging:
@@ -152,8 +138,6 @@ services:
 #    environment:
 #      - TOBAGO_VERSION=2.4.4
 #      - CONTEXT_PATH=demo-2-release
-#    volumes:
-#      - ~/tobago-vm/artifacts:/opt/docker/artifacts
 #    ports:
 #      - "8200:8080"
 #    logging:
@@ -166,8 +150,6 @@ services:
 #      - TOBAGO_VERSION=2.4.4
 #      - STAGING_NUMBER=1179
 #      - CONTEXT_PATH=demo-2-staging
-#    volumes:
-#      - ~/tobago-vm/artifacts:/opt/docker/artifacts
 #    ports:
 #      - "8201:8080"
 #    logging:
@@ -179,8 +161,6 @@ services:
     environment:
       - TOBAGO_VERSION=2.4.5-SNAPSHOT
       - CONTEXT_PATH=demo-2-snapshot
-    volumes:
-      - ~/tobago-vm/artifacts:/opt/docker/artifacts
     ports:
       - "8202:8080"
     logging:
@@ -192,8 +172,6 @@ services:
 #    environment:
 #      - TOBAGO_VERSION=1.5.13
 #      - CONTEXT_PATH=demo-1-5-release
-#    volumes:
-#      - ~/tobago-vm/artifacts:/opt/docker/artifacts
 #    ports:
 #      - "8150:8080"
 #    logging:
@@ -205,8 +183,6 @@ services:
 #    environment:
 #      - TOBAGO_VERSION=1.0.42
 #      - CONTEXT_PATH=demo-1-0-release
-#    volumes:
-#      - ~/tobago-vm/artifacts:/opt/docker/artifacts
 #    ports:
 #      - "8100:8080"
 #    logging:
diff --git a/tobago/tobago-vm/tomcat/Dockerfile b/tobago/tobago-vm/tomcat/Dockerfile
index 1432bee..5990eea 100644
--- a/tobago/tobago-vm/tomcat/Dockerfile
+++ b/tobago/tobago-vm/tomcat/Dockerfile
@@ -13,14 +13,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-FROM tomcat:8.5-jdk8-adoptopenjdk-hotspot
+FROM tomcat:8.5-jdk8-temurin
 MAINTAINER dev@myfaces.apache.org
 
-# ansible is needed for downloading from Nexus, todo: may be changed to mvn
-RUN apt-get update \
- && apt-get install -y less vim procps ansible python3-lxml\
- && apt-get clean
-
 RUN rm -r /usr/local/tomcat/webapps.dist
 
 COPY server.xml /usr/local/tomcat/conf
@@ -30,6 +25,8 @@ RUN chmod +x /usr/local/tomcat/bin/download-deploy-and-run.sh
 #ENV TOBAGO_VERSION undefined
 #ENV CONTEXT_PATH ROOT
 
+RUN chown -R www-data:www-data /usr/local/tomcat
+
 USER www-data
 
 CMD ["download-deploy-and-run.sh"]
diff --git a/tobago/tobago-vm/tomcat/download-deploy-and-run.sh b/tobago/tobago-vm/tomcat/download-deploy-and-run.sh
index ce6ae2b..5958611 100644
--- a/tobago/tobago-vm/tomcat/download-deploy-and-run.sh
+++ b/tobago/tobago-vm/tomcat/download-deploy-and-run.sh
@@ -16,17 +16,20 @@
 # limitations under the License.
 
 if [[ ${TOBAGO_VERSION} == *-SNAPSHOT ]]; then
-   REPO=https://repository.apache.org/content/repositories/snapshots
+   REPO=snapshots
 elif [[ ${STAGING_NUMBER} ]]; then
-   REPO=https://repository.apache.org/content/repositories/orgapachemyfaces-${STAGING_NUMBER}/
+#todo: not tested yet
+  REPO=orgapachemyfaces-${STAGING_NUMBER}
 else
-   REPO=https://repository.apache.org/content/repositories/releases
+  REPO=releases
 fi
 
 TARGET=/usr/local/tomcat/webapps/${CONTEXT_PATH}
-ARTIFACT=/opt/docker/artifacts/tobago-example-demo-${TOBAGO_VERSION}.war
+ARTIFACT=/usr/local/tomcat/tobago-example-demo-${TOBAGO_VERSION}.war
+
+set -x
+curl -o ${ARTIFACT} "https://repository.apache.org/service/local/artifact/maven/content?r=${REPO}&g=org.apache.myfaces.tobago&a=tobago-example-demo&p=war&v=${TOBAGO_VERSION}"
 
-ansible localhost -m maven_artifact -a "group_id=org.apache.myfaces.tobago artifact_id=tobago-example-demo version=${TOBAGO_VERSION} extension=war repository_url=${REPO} dest=${ARTIFACT}"
 mkdir ${TARGET}
 pushd ${TARGET} && jar xf ${ARTIFACT}