From 5e9b4ce08c3ab082a69d9a37c633f3f70746b422 Mon Sep 17 00:00:00 2001 From: cezary-witkowski Date: Fri, 15 Nov 2024 11:59:48 +0100 Subject: [PATCH 1/5] [ACS-5768] Updated jolokia to current newest version and removed tomcat migrate.sh workaround script usage --- tests/environment/alfresco-with-jolokia/Dockerfile | 3 +-- tests/pipeline-all-amps/repo/Dockerfile | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/environment/alfresco-with-jolokia/Dockerfile b/tests/environment/alfresco-with-jolokia/Dockerfile index 7896e5f204..5297b6899a 100644 --- a/tests/environment/alfresco-with-jolokia/Dockerfile +++ b/tests/environment/alfresco-with-jolokia/Dockerfile @@ -1,14 +1,13 @@ # BUILD STAGE FROM alfresco/alfresco-content-repository:latest AS JOLOKIABUILDER -ARG JOLOKIA_VER=1.6.2 +ARG JOLOKIA_VER=2.1.2 ARG TOMCAT_DIR=/usr/local/tomcat USER root RUN yum install -y curl-minimal unzip && \ mkdir -p /build/jolokia && \ curl -o /build/jolokia-jee.war https://repo1.maven.org/maven2/org/jolokia/jolokia-war-unsecured/${JOLOKIA_VER}/jolokia-war-unsecured-${JOLOKIA_VER}.war && \ - ${TOMCAT_DIR}/bin/migrate.sh /build/jolokia-jee.war /build/jolokia.war && \ unzip -q /build/jolokia.war -d /build/jolokia && chmod -R g+r,g-w,o= /build # ACTUAL IMAGE diff --git a/tests/pipeline-all-amps/repo/Dockerfile b/tests/pipeline-all-amps/repo/Dockerfile index 01e4894f5d..6b59a34863 100644 --- a/tests/pipeline-all-amps/repo/Dockerfile +++ b/tests/pipeline-all-amps/repo/Dockerfile @@ -1,11 +1,11 @@ ARG BASE_IMAGE # BUILD STAGE SWAGGERBUILDER -FROM debian:11-slim AS SWAGGERBUILDER +FROM alfresco/alfresco-enterprise-repo-base:latest AS SWAGGERBUILDER -ARG JOLOKIA_VER=1.6.2 +ARG JOLOKIA_VER=2.1.2 -RUN DEBIAN_FRONTEND=noninteractive; \ - apt-get update -yqq && apt-get -yqq install curl unzip && \ +USER root +RUN yum install -y curl unzip && \ mkdir -p /build/{api-explorer,gs-api-explorer,jolokia} && \ curl -o /build/jolokia.war https://repo1.maven.org/maven2/org/jolokia/jolokia-war-unsecured/${JOLOKIA_VER}/jolokia-war-unsecured-${JOLOKIA_VER}.war && \ unzip -q /build/jolokia.war -d /build/jolokia From abdc5bf58cd96b707a38365b466fec6fcb6883cb Mon Sep 17 00:00:00 2001 From: cezary-witkowski Date: Fri, 15 Nov 2024 12:42:37 +0100 Subject: [PATCH 2/5] [ACS-5768] Wrong name in script fix --- tests/environment/alfresco-with-jolokia/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/environment/alfresco-with-jolokia/Dockerfile b/tests/environment/alfresco-with-jolokia/Dockerfile index 5297b6899a..2f8adb23dd 100644 --- a/tests/environment/alfresco-with-jolokia/Dockerfile +++ b/tests/environment/alfresco-with-jolokia/Dockerfile @@ -7,7 +7,7 @@ ARG TOMCAT_DIR=/usr/local/tomcat USER root RUN yum install -y curl-minimal unzip && \ mkdir -p /build/jolokia && \ - curl -o /build/jolokia-jee.war https://repo1.maven.org/maven2/org/jolokia/jolokia-war-unsecured/${JOLOKIA_VER}/jolokia-war-unsecured-${JOLOKIA_VER}.war && \ + curl -o /build/jolokia.war https://repo1.maven.org/maven2/org/jolokia/jolokia-war-unsecured/${JOLOKIA_VER}/jolokia-war-unsecured-${JOLOKIA_VER}.war && \ unzip -q /build/jolokia.war -d /build/jolokia && chmod -R g+r,g-w,o= /build # ACTUAL IMAGE From 22c0d0e696b88781316be34627223bcc7f51b289 Mon Sep 17 00:00:00 2001 From: cezary-witkowski Date: Fri, 15 Nov 2024 13:35:42 +0100 Subject: [PATCH 3/5] [ACS-5768] From 2.0.0 they changed the name from jolokia-war-unsecured to jolokia-agent-war-unsecured --- tests/environment/alfresco-with-jolokia/Dockerfile | 2 +- tests/pipeline-all-amps/repo/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/environment/alfresco-with-jolokia/Dockerfile b/tests/environment/alfresco-with-jolokia/Dockerfile index 2f8adb23dd..8e2937db15 100644 --- a/tests/environment/alfresco-with-jolokia/Dockerfile +++ b/tests/environment/alfresco-with-jolokia/Dockerfile @@ -7,7 +7,7 @@ ARG TOMCAT_DIR=/usr/local/tomcat USER root RUN yum install -y curl-minimal unzip && \ mkdir -p /build/jolokia && \ - curl -o /build/jolokia.war https://repo1.maven.org/maven2/org/jolokia/jolokia-war-unsecured/${JOLOKIA_VER}/jolokia-war-unsecured-${JOLOKIA_VER}.war && \ + curl -o /build/jolokia.war https://repo1.maven.org/maven2/org/jolokia/jolokia-agent-war-unsecured/${JOLOKIA_VER}/jolokia-agent-war-unsecured-${JOLOKIA_VER}.war && \ unzip -q /build/jolokia.war -d /build/jolokia && chmod -R g+r,g-w,o= /build # ACTUAL IMAGE diff --git a/tests/pipeline-all-amps/repo/Dockerfile b/tests/pipeline-all-amps/repo/Dockerfile index 6b59a34863..57c6f1abc1 100644 --- a/tests/pipeline-all-amps/repo/Dockerfile +++ b/tests/pipeline-all-amps/repo/Dockerfile @@ -7,7 +7,7 @@ ARG JOLOKIA_VER=2.1.2 USER root RUN yum install -y curl unzip && \ mkdir -p /build/{api-explorer,gs-api-explorer,jolokia} && \ - curl -o /build/jolokia.war https://repo1.maven.org/maven2/org/jolokia/jolokia-war-unsecured/${JOLOKIA_VER}/jolokia-war-unsecured-${JOLOKIA_VER}.war && \ + curl -o /build/jolokia.war https://repo1.maven.org/maven2/org/jolokia/jolokia-agent-war-unsecured/${JOLOKIA_VER}/jolokia-agent-war-unsecured-${JOLOKIA_VER}.war && \ unzip -q /build/jolokia.war -d /build/jolokia COPY target/wars/api-explorer.war /build From 44e3dfb970a81e1de5da054e5221947ab89adcf5 Mon Sep 17 00:00:00 2001 From: cezary-witkowski Date: Fri, 15 Nov 2024 14:38:46 +0100 Subject: [PATCH 4/5] [ACS-5768] Switch to alpine for build stage --- tests/environment/alfresco-with-jolokia/Dockerfile | 9 +++++---- tests/pipeline-all-amps/repo/Dockerfile | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/environment/alfresco-with-jolokia/Dockerfile b/tests/environment/alfresco-with-jolokia/Dockerfile index 8e2937db15..6725db49dc 100644 --- a/tests/environment/alfresco-with-jolokia/Dockerfile +++ b/tests/environment/alfresco-with-jolokia/Dockerfile @@ -1,14 +1,15 @@ # BUILD STAGE -FROM alfresco/alfresco-content-repository:latest AS JOLOKIABUILDER +FROM alpine:3.20.3 AS JOLOKIABUILDER ARG JOLOKIA_VER=2.1.2 -ARG TOMCAT_DIR=/usr/local/tomcat USER root -RUN yum install -y curl-minimal unzip && \ +RUN apk update && \ + apk add --no-cache curl unzip && \ mkdir -p /build/jolokia && \ curl -o /build/jolokia.war https://repo1.maven.org/maven2/org/jolokia/jolokia-agent-war-unsecured/${JOLOKIA_VER}/jolokia-agent-war-unsecured-${JOLOKIA_VER}.war && \ - unzip -q /build/jolokia.war -d /build/jolokia && chmod -R g+r,g-w,o= /build + unzip -q /build/jolokia.war -d /build/jolokia && \ + chmod -R g+r,g-w,o= /build # ACTUAL IMAGE FROM alfresco/alfresco-content-repository:latest diff --git a/tests/pipeline-all-amps/repo/Dockerfile b/tests/pipeline-all-amps/repo/Dockerfile index 57c6f1abc1..28a0e6f9c6 100644 --- a/tests/pipeline-all-amps/repo/Dockerfile +++ b/tests/pipeline-all-amps/repo/Dockerfile @@ -1,11 +1,12 @@ ARG BASE_IMAGE # BUILD STAGE SWAGGERBUILDER -FROM alfresco/alfresco-enterprise-repo-base:latest AS SWAGGERBUILDER +FROM alpine:3.20.3 AS SWAGGERBUILDER ARG JOLOKIA_VER=2.1.2 USER root -RUN yum install -y curl unzip && \ +RUN apk update && \ + apk add --no-cache curl unzip && \ mkdir -p /build/{api-explorer,gs-api-explorer,jolokia} && \ curl -o /build/jolokia.war https://repo1.maven.org/maven2/org/jolokia/jolokia-agent-war-unsecured/${JOLOKIA_VER}/jolokia-agent-war-unsecured-${JOLOKIA_VER}.war && \ unzip -q /build/jolokia.war -d /build/jolokia From 3df04c7c761b8c4cd296772cfb4c0531f8744658 Mon Sep 17 00:00:00 2001 From: cezary-witkowski Date: Mon, 18 Nov 2024 11:52:16 +0100 Subject: [PATCH 5/5] [ACS-5768] Going back to alfresco-enterprise-repo-base --- tests/environment/alfresco-with-jolokia/Dockerfile | 5 ++--- tests/pipeline-all-amps/repo/Dockerfile | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/environment/alfresco-with-jolokia/Dockerfile b/tests/environment/alfresco-with-jolokia/Dockerfile index 6725db49dc..e368703afc 100644 --- a/tests/environment/alfresco-with-jolokia/Dockerfile +++ b/tests/environment/alfresco-with-jolokia/Dockerfile @@ -1,11 +1,10 @@ # BUILD STAGE -FROM alpine:3.20.3 AS JOLOKIABUILDER +FROM alfresco/alfresco-content-repository:latest AS JOLOKIABUILDER ARG JOLOKIA_VER=2.1.2 USER root -RUN apk update && \ - apk add --no-cache curl unzip && \ +RUN yum install -y curl-minimal unzip && \ mkdir -p /build/jolokia && \ curl -o /build/jolokia.war https://repo1.maven.org/maven2/org/jolokia/jolokia-agent-war-unsecured/${JOLOKIA_VER}/jolokia-agent-war-unsecured-${JOLOKIA_VER}.war && \ unzip -q /build/jolokia.war -d /build/jolokia && \ diff --git a/tests/pipeline-all-amps/repo/Dockerfile b/tests/pipeline-all-amps/repo/Dockerfile index 28a0e6f9c6..1239b4233d 100644 --- a/tests/pipeline-all-amps/repo/Dockerfile +++ b/tests/pipeline-all-amps/repo/Dockerfile @@ -1,12 +1,11 @@ ARG BASE_IMAGE # BUILD STAGE SWAGGERBUILDER -FROM alpine:3.20.3 AS SWAGGERBUILDER +FROM alfresco/alfresco-content-repository:latest AS SWAGGERBUILDER ARG JOLOKIA_VER=2.1.2 USER root -RUN apk update && \ - apk add --no-cache curl unzip && \ +RUN yum install -y curl-minimal unzip && \ mkdir -p /build/{api-explorer,gs-api-explorer,jolokia} && \ curl -o /build/jolokia.war https://repo1.maven.org/maven2/org/jolokia/jolokia-agent-war-unsecured/${JOLOKIA_VER}/jolokia-agent-war-unsecured-${JOLOKIA_VER}.war && \ unzip -q /build/jolokia.war -d /build/jolokia