Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ACS-5039 Transformers multi-arch support #837

Merged
merged 25 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
6972786
ACS-5039 - alfresco-transform-example -added a build-multiarch-docker…
wojtekswieton May 24, 2023
4dc81b0
ACS-5039 - Moved dokcer builder properties to global pom file (image.…
wojtekswieton May 29, 2023
5bfa2ae
ACS-5039 - Changes in: push-docker-images, internal, release profiles
wojtekswieton May 29, 2023
385b818
ACS-5039 - Deleted redundant properties
wojtekswieton May 29, 2023
5c1a814
ACS-5039 - Changes in: internal profile
wojtekswieton May 29, 2023
ff22183
ACS-5039 - Changes in pdfrenderer nternal and release profiles
wojtekswieton May 30, 2023
3fc36ed
ACS-5039 - Updated alfresco/alfresco-activemq in docker-it-setup profile
wojtekswieton May 30, 2023
4ea0f96
ACS-5039 - Updated internal and release profiles in a tika engine pom
wojtekswieton May 30, 2023
5bb8ccb
ACS-5039 - Deleted redundant properties and scripts
wojtekswieton May 30, 2023
86eecc8
ACS-5039 - Upgrade docker-maven-plugin to 0.43.0, added provenance to…
wojtekswieton Jul 3, 2023
5053e0b
ACS-5039 - Upgrade docker-maven-plugin to 0.43.0, added provenance to…
wojtekswieton Jul 3, 2023
b021668
ACS-5039 - Added provenance to pdf-renderer and tika images
wojtekswieton Jul 3, 2023
3c6d044
ACS-5039 - Temp version of imagemagick Dockerfile for test purposes
wojtekswieton Jul 4, 2023
d50deb4
ACS-5039 - Temp version of imagemagick Dockerfile for test purposes
wojtekswieton Jul 4, 2023
9ab4e14
ACS-5039 - Changes in imagemagick Dockerfile and pom to allow produce…
wojtekswieton Jul 4, 2023
a54d904
ACS-5039 - Changes in imagemagick Dockerfile and pom to allow produce…
wojtekswieton Jul 5, 2023
4b82d78
ACS-5039 - Changes to try push by CI
wojtekswieton Jul 5, 2023
e0ce9d1
ACS-5039 - Changes to try push by CI
wojtekswieton Jul 5, 2023
ceef801
ACS-5039 - Changes to try push by CI
wojtekswieton Jul 5, 2023
a346c09
ACS-5039 - Revert test changes
wojtekswieton Jul 5, 2023
5f1d216
ACS-5039 - Revert test changes
wojtekswieton Jul 5, 2023
f1e5bc2
ACS-5039 - Added a arm65 Libreoffice rpm, changes to allow build mult…
wojtekswieton Jul 12, 2023
451ad80
ACS-5039 - Delete redundant image.registry property
wojtekswieton Jul 12, 2023
2d4cdfd
ACS-5039 - Changes in Imagemagick urls
wojtekswieton Jul 12, 2023
2f4efcf
ACS-5039 - Code review changes. Change to one imagemagick download pa…
wojtekswieton Jul 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ jobs:
persist-credentials: false
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: linux/amd64,linux/arm64
- name: "Login to Docker Hub"
uses: docker/[email protected]
with:
Expand Down
28 changes: 18 additions & 10 deletions engines/aio/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ ARG EXIFTOOL_FOLDER=Image-ExifTool-${EXIFTOOL_VERSION}
ARG EXIFTOOL_URL=https://nexus.alfresco.com/nexus/service/local/repositories/thirdparty/content/org/exiftool/image-exiftool/${EXIFTOOL_VERSION}/image-exiftool-${EXIFTOOL_VERSION}.tgz

ARG IMAGEMAGICK_VERSION=7.1.0-16
ENV IMAGEMAGICK_RPM_URL=https://github.com/Alfresco/imagemagick-build/releases/download/v${IMAGEMAGICK_VERSION}/ImageMagick-${IMAGEMAGICK_VERSION}.x86_64.rpm
ENV IMAGEMAGICK_LIB_RPM_URL=https://github.com/Alfresco/imagemagick-build/releases/download/v${IMAGEMAGICK_VERSION}/ImageMagick-libs-${IMAGEMAGICK_VERSION}.x86_64.rpm
ENV IMAGEMAGICK_RPM_URL=https://nexus.alfresco.com/nexus/service/local/repositories/thirdparty/content/org/imagemagick/imagemagick-distribution/${IMAGEMAGICK_VERSION}-ci-3/imagemagick-distribution-${IMAGEMAGICK_VERSION}-ci-3
ENV IMAGEMAGICK_DEP_RPM_URL=https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

ARG LIBREOFFICE_VERSION=7.2.5
ENV LIBREOFFICE_RPM_URL=https://nexus.alfresco.com/nexus/service/local/repositories/thirdparty/content/org/libreoffice/libreoffice-dist/${LIBREOFFICE_VERSION}/libreoffice-dist-${LIBREOFFICE_VERSION}-linux.gz
ENV LIBREOFFICE_ARM64_RPM_URL=https://dl.rockylinux.org/pub/rocky/8.8/devel/aarch64/os/Packages/l/libreoffice-core-6.4.7.2-13.el8.aarch64.rpm

ENV ALFRESCO_PDF_RENDERER_LIB_RPM_URL=https://nexus.alfresco.com/nexus/service/local/repositories/releases/content/org/alfresco/alfresco-pdf-renderer/1.1/alfresco-pdf-renderer-1.1-linux.tgz

Expand All @@ -34,15 +34,23 @@ COPY target/${env.project_artifactId}-${env.project_version}.jar /usr/bin
#removing perl-ExtUtils-MakeMaker cascades to remove exiftools
RUN ln /usr/bin/${env.project_artifactId}-${env.project_version}.jar /usr/bin/${env.project_artifactId}.jar && \
yum install -y $IMAGEMAGICK_DEP_RPM_URL && \
yum install -y $IMAGEMAGICK_LIB_RPM_URL $IMAGEMAGICK_RPM_URL && \
rpm -e --nodeps libgs && \
dsibilio marked this conversation as resolved.
Show resolved Hide resolved
if [ "$(uname -m)" = "x86_64" ]; then \
yum install -y ${IMAGEMAGICK_RPM_URL}-el8.rpm ${IMAGEMAGICK_RPM_URL}-el8-libs.rpm; \
else \
yum install -y ${IMAGEMAGICK_RPM_URL}-arm64.rpm ${IMAGEMAGICK_RPM_URL}-arm64-libs.rpm; \
fi && \
yum install -y cairo cups-libs libSM libGLU && \
test -f libreoffice-dist-${LIBREOFFICE_VERSION}-linux.gz && \
ln -s libreoffice-dist-${LIBREOFFICE_VERSION}-linux.gz libreoffice-dist-linux.gz || \
curl -s -S $LIBREOFFICE_RPM_URL -o libreoffice-dist-linux.gz && \
tar xzf libreoffice-dist-linux.gz && \
yum localinstall -y LibreOffice*/RPMS/*.rpm && \
rm -rf libreoffice-dist-*linux.gz LibreOffice_*_Linux_x86-64_rpm && \
if [ "$(uname -m)" = "x86_64" ]; then \
test -f libreoffice-dist-${LIBREOFFICE_VERSION}-linux.gz && \
ln -s libreoffice-dist-${LIBREOFFICE_VERSION}-linux.gz libreoffice-dist-linux.gz || \
curl -s -S $LIBREOFFICE_RPM_URL -o libreoffice-dist-linux.gz && \
tar xzf libreoffice-dist-linux.gz && \
yum localinstall -y LibreOffice*/RPMS/*.rpm && \
rm -rf libreoffice-dist-*linux.gz LibreOffice_*_Linux_x86-64_rpm; \
else \
yum install -y $LIBREOFFICE_ARM64_RPM_URL && \
update-alternatives --set java java-17-openjdk.aarch64; \
fi && \
curl -s -S $ALFRESCO_PDF_RENDERER_LIB_RPM_URL -o alfresco-pdf-renderer-linux.tgz && \
tar xf alfresco-pdf-renderer-linux.tgz -C /usr/bin && \
rm -f alfresco-pdf-renderer-linux.tgz && \
Expand Down
37 changes: 36 additions & 1 deletion engines/aio/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

<properties>
<image.name>alfresco/alfresco-transform-core-aio</image.name>
<image.registry>quay.io</image.registry>
<env.project_artifactId>${project.artifactId}</env.project_artifactId>
</properties>

Expand Down Expand Up @@ -339,6 +338,15 @@
<name>${image.name}:${image.tag}</name>
<registry>${image.registry}</registry>
<build>
<buildx>
<platforms>
<platform>linux/amd64</platform>
<platform>linux/arm64</platform>
</platforms>
<attestations>
<provenance>false</provenance>
</attestations>
</buildx>
<contextDir>${project.basedir}</contextDir>
<buildOptions>
<squash>true</squash>
Expand All @@ -349,6 +357,15 @@
<image>
<name>${image.name}:${image.tag}</name>
<build>
<buildx>
<platforms>
<platform>linux/amd64</platform>
<platform>linux/arm64</platform>
</platforms>
<attestations>
<provenance>false</provenance>
</attestations>
</buildx>
<contextDir>${project.basedir}</contextDir>
<buildOptions>
<squash>true</squash>
Expand Down Expand Up @@ -392,6 +409,15 @@
<name>${image.name}:${project.version}</name>
<registry>${image.registry}</registry>
<build>
<buildx>
<platforms>
<platform>linux/amd64</platform>
<platform>linux/arm64</platform>
</platforms>
<attestations>
<provenance>false</provenance>
</attestations>
</buildx>
<contextDir>${project.basedir}</contextDir>
<buildOptions>
<squash>true</squash>
Expand All @@ -402,6 +428,15 @@
<image>
<name>${image.name}:${project.version}</name>
<build>
<buildx>
<platforms>
<platform>linux/amd64</platform>
<platform>linux/arm64</platform>
</platforms>
<attestations>
<provenance>false</provenance>
</attestations>
</buildx>
<contextDir>${project.basedir}</contextDir>
<buildOptions>
<squash>true</squash>
Expand Down
82 changes: 81 additions & 1 deletion engines/example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

<properties>
<image.name>alfresco/alfresco-transform-example</image.name>
<image.registry>quay.io</image.registry>
<env.project_artifactId>${project.artifactId}</env.project_artifactId>
</properties>

Expand Down Expand Up @@ -199,6 +198,51 @@
</build>
</profile>

<profile>
<id>push-docker-images</id>
<!-- publishes "image:latest" on Quay -->
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<verbose>true</verbose>
<images>
<!-- Quay image -->
<image>
<name>${image.name}:${image.tag}</name>
<registry>${image.registry}</registry>
<build>
<buildx>
<platforms>
<platform>linux/amd64</platform>
<platform>linux/arm64</platform>
</platforms>
<attestations>
<provenance>false</provenance>
</attestations>
</buildx>
<contextDir>${project.basedir}</contextDir>
</build>
</image>
</images>
</configuration>
<executions>
<execution>
<id>build-push-image</id>
<phase>install</phase>
<goals>
<goal>build</goal>
<goal>push</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>internal</id>
<build>
Expand All @@ -213,6 +257,15 @@
<name>${image.name}:${image.tag}</name>
<registry>${image.registry}</registry>
<build>
<buildx>
<platforms>
<platform>linux/amd64</platform>
<platform>linux/arm64</platform>
</platforms>
<attestations>
<provenance>false</provenance>
</attestations>
</buildx>
<contextDir>${project.basedir}</contextDir>
<buildOptions>
<squash>true</squash>
Expand All @@ -223,6 +276,15 @@
<image>
<name>${image.name}:${image.tag}</name>
<build>
<buildx>
<platforms>
<platform>linux/amd64</platform>
<platform>linux/arm64</platform>
</platforms>
<attestations>
<provenance>false</provenance>
</attestations>
</buildx>
<contextDir>${project.basedir}</contextDir>
<buildOptions>
<squash>true</squash>
Expand Down Expand Up @@ -266,6 +328,15 @@
<name>${image.name}:${project.version}</name>
<registry>${image.registry}</registry>
<build>
<buildx>
<platforms>
<platform>linux/amd64</platform>
<platform>linux/arm64</platform>
</platforms>
<attestations>
<provenance>false</provenance>
</attestations>
</buildx>
<contextDir>${project.basedir}</contextDir>
<buildOptions>
<squash>true</squash>
Expand All @@ -276,6 +347,15 @@
<image>
<name>${image.name}:${project.version}</name>
<build>
<buildx>
<platforms>
<platform>linux/amd64</platform>
<platform>linux/arm64</platform>
</platforms>
<attestations>
<provenance>false</provenance>
</attestations>
</buildx>
<contextDir>${project.basedir}</contextDir>
<buildOptions>
<squash>true</squash>
Expand Down
12 changes: 7 additions & 5 deletions engines/imagemagick/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ FROM alfresco/alfresco-base-java:jre17-rockylinux8-202302221525
# For other ImageMagick versions please look at https://github.com/Alfresco/imagemagick-build tags
ARG IMAGEMAGICK_VERSION=7.1.0-16

ENV IMAGEMAGICK_RPM_URL=https://github.com/Alfresco/imagemagick-build/releases/download/v${IMAGEMAGICK_VERSION}/ImageMagick-${IMAGEMAGICK_VERSION}.x86_64.rpm
ENV IMAGEMAGICK_LIB_RPM_URL=https://github.com/Alfresco/imagemagick-build/releases/download/v${IMAGEMAGICK_VERSION}/ImageMagick-libs-${IMAGEMAGICK_VERSION}.x86_64.rpm
ENV IMAGEMAGICK_RPM_URL=https://nexus.alfresco.com/nexus/service/local/repositories/thirdparty/content/org/imagemagick/imagemagick-distribution/${IMAGEMAGICK_VERSION}-ci-3/imagemagick-distribution-${IMAGEMAGICK_VERSION}-ci-3
ENV IMAGEMAGICK_DEP_RPM_URL=https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
ENV JAVA_OPTS=""

Expand All @@ -22,9 +21,12 @@ COPY target/${env.project_artifactId}-${env.project_version}.jar /usr/bin

RUN ln /usr/bin/${env.project_artifactId}-${env.project_version}.jar /usr/bin/${env.project_artifactId}.jar && \
yum install -y $IMAGEMAGICK_DEP_RPM_URL && \
yum install -y $IMAGEMAGICK_LIB_RPM_URL $IMAGEMAGICK_RPM_URL && \
yum clean all && \
rpm -e --nodeps libgs
dsibilio marked this conversation as resolved.
Show resolved Hide resolved
if [ "$(uname -m)" = "x86_64" ]; then \
yum install -y ${IMAGEMAGICK_RPM_URL}-el8.rpm ${IMAGEMAGICK_RPM_URL}-el8-libs.rpm; \
else \
yum install -y ${IMAGEMAGICK_RPM_URL}-arm64.rpm ${IMAGEMAGICK_RPM_URL}-arm64-libs.rpm; \
fi && \
yum clean all

ADD target/generated-resources/licenses /licenses
ADD target/generated-resources/licenses.xml /licenses/
Expand Down
Loading
Loading