mirror of
https://github.com/Alfresco/alfresco-transform-core.git
synced 2025-05-12 17:04:48 +00:00
ATS-400 : Build improvements for TravisCI (#24)
* ATS-400 : Build improvements for TravisCI Building the LibreOffice docker image takes a long time due to the large packages that need to be downloaded and installed. This results in more than 10 minutes of inactivity in the build log and TravisCI kills the job. Improvements: - remove and replace unnecessary steps in Docker builds - cache LibreOffice GZIP distribution in Travis
This commit is contained in:
parent
27a55855fb
commit
053a6f16e8
@ -13,6 +13,7 @@ services:
|
||||
cache:
|
||||
directories:
|
||||
- ${HOME}/.m2/repository
|
||||
- ${HOME}/artifacts
|
||||
|
||||
branches:
|
||||
only:
|
||||
@ -37,6 +38,7 @@ jobs:
|
||||
stage: build
|
||||
if: branch NOT IN (company_release)
|
||||
before_install: bash _ci/init.sh
|
||||
before_script: travis_wait bash _ci/cache_artifacts.sh
|
||||
script: bash _ci/build.sh
|
||||
|
||||
- name: "WhiteSource"
|
||||
@ -49,6 +51,7 @@ jobs:
|
||||
stage: release
|
||||
if: branch IN (release, release/SP/1.3.N, release/SP/2.0.N)
|
||||
before_install: bash _ci/init.sh
|
||||
before_script: travis_wait bash _ci/cache_artifacts.sh
|
||||
script: bash _ci/release.sh
|
||||
before_deploy: source _ci/prepare_staging_deploy.sh
|
||||
deploy:
|
||||
|
22
_ci/cache_artifacts.sh
Normal file
22
_ci/cache_artifacts.sh
Normal file
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
echo "=========================== Starting Cache Artifacts Script ==========================="
|
||||
PS4="\[\e[35m\]+ \[\e[m\]"
|
||||
set -vex
|
||||
pushd "$(dirname "${BASH_SOURCE[0]}")/../"
|
||||
|
||||
# Cache the LibreOffice distribution, as it is takes a long time to download and it can cause the
|
||||
# build to fail (no output for more than 10 minutes)
|
||||
LIBREOFFICE_RPM_URL="https://nexus.alfresco.com/nexus/service/local/repositories/thirdparty/content/org/libreoffice/libreoffice-dist/5.4.6/libreoffice-dist-5.4.6-linux.gz"
|
||||
if [ -f "${HOME}/artifacts/libreoffice-dist-5.4.6-linux.gz" ]; then
|
||||
echo "Using cached LibreOffice distribution..."
|
||||
else
|
||||
echo "Downloading LibreOffice distribution..."
|
||||
curl -s -S ${LIBREOFFICE_RPM_URL} -o "${HOME}/artifacts/libreoffice-dist-5.4.6-linux.gz"
|
||||
fi
|
||||
cp "${HOME}/artifacts/libreoffice-dist-5.4.6-linux.gz" alfresco-docker-libreoffice/
|
||||
|
||||
|
||||
popd
|
||||
set +vex
|
||||
echo "=========================== Finishing Cache Artifacts Script =========================="
|
@ -18,12 +18,10 @@ ARG USERID=33001
|
||||
COPY target/alfresco-docker-alfresco-pdf-renderer-${env.project_version}.jar /usr/bin
|
||||
|
||||
RUN ln /usr/bin/alfresco-docker-alfresco-pdf-renderer-${env.project_version}.jar /usr/bin/alfresco-docker-alfresco-pdf-renderer.jar && \
|
||||
yum install -y wget && \
|
||||
wget $ALFRESCO_PDF_RENDERER_LIB_RPM_URL && \
|
||||
wget $PDFIUM_LICENSE_FILE && \
|
||||
tar xf alfresco-pdf-renderer-*-linux.tgz -C /usr/bin && \
|
||||
rm -f alfresco-pdf-renderer-*-linux.tgz && \
|
||||
yum remove -y wget && \
|
||||
curl -s -S $ALFRESCO_PDF_RENDERER_LIB_RPM_URL -o alfresco-pdf-renderer-linux.tgz && \
|
||||
curl -s -S $PDFIUM_LICENSE_FILE -o pdfium.txt && \
|
||||
tar xf alfresco-pdf-renderer-linux.tgz -C /usr/bin && \
|
||||
rm -f alfresco-pdf-renderer-linux.tgz && \
|
||||
yum clean all
|
||||
|
||||
ADD target/generated-resources/licenses /licenses
|
||||
|
@ -67,7 +67,6 @@
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>fabric8-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<verbose/>
|
||||
<images>
|
||||
<image>
|
||||
<name>${image.name}:${image.tag}</name>
|
||||
@ -112,7 +111,6 @@
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>fabric8-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<verbose/>
|
||||
<images>
|
||||
<!-- QuayIO image -->
|
||||
<image>
|
||||
@ -154,7 +152,6 @@
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>fabric8-maven-plugin</artifactId>
|
||||
<configuration combine.self="override">
|
||||
<verbose/>
|
||||
<images>
|
||||
<!-- QuayIO image -->
|
||||
<image>
|
||||
|
@ -19,13 +19,11 @@ ARG USERID=33002
|
||||
COPY target/alfresco-docker-imagemagick-${env.project_version}.jar /usr/bin
|
||||
|
||||
RUN ln /usr/bin/alfresco-docker-imagemagick-${env.project_version}.jar /usr/bin/alfresco-docker-imagemagick.jar && \
|
||||
yum install -y wget && \
|
||||
wget $IMAGEMAGICK_RPM_URL && \
|
||||
wget $IMAGEMAGICK_LIB_RPM_URL && \
|
||||
wget $IMAGEMAGICK_LICENSE_FILE && \
|
||||
yum localinstall -y imagemagick-distribution-*-linux.rpm && \
|
||||
rm -f imagemagick-distribution-*-linux.rpm && \
|
||||
yum remove -y wget && \
|
||||
curl -s -S $IMAGEMAGICK_RPM_URL -o imagemagick-distribution-linux.rpm && \
|
||||
curl -s -S $IMAGEMAGICK_LIB_RPM_URL -o imagemagick-distribution-libs-linux.rpm && \
|
||||
curl -s -S $IMAGEMAGICK_LICENSE_FILE -o ImageMagick-license.txt && \
|
||||
yum localinstall -y imagemagick-distribution-*linux.rpm && \
|
||||
rm -f imagemagick-distribution-*.rpm && \
|
||||
yum clean all
|
||||
|
||||
ADD target/generated-resources/licenses /licenses
|
||||
|
@ -67,7 +67,6 @@
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>fabric8-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<verbose/>
|
||||
<images>
|
||||
<image>
|
||||
<name>${image.name}:${image.tag}</name>
|
||||
@ -112,7 +111,6 @@
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>fabric8-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<verbose/>
|
||||
<images>
|
||||
<!-- QuayIO image -->
|
||||
<image>
|
||||
@ -154,7 +152,6 @@
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>fabric8-maven-plugin</artifactId>
|
||||
<configuration combine.self="override">
|
||||
<verbose/>
|
||||
<images>
|
||||
<!-- QuayIO image -->
|
||||
<image>
|
||||
|
@ -15,17 +15,17 @@ ARG GROUPID=1000
|
||||
ARG USERNAME=libreoffice
|
||||
ARG USERID=33003
|
||||
|
||||
COPY target/alfresco-docker-libreoffice-${env.project_version}.jar /usr/bin
|
||||
COPY target/alfresco-docker-libreoffice-${env.project_version}.jar libreoffice-dist-*-linux.gz /
|
||||
|
||||
RUN ln /usr/bin/alfresco-docker-libreoffice-${env.project_version}.jar /usr/bin/alfresco-docker-libreoffice.jar && \
|
||||
yum install -y wget && \
|
||||
RUN ln /alfresco-docker-libreoffice-${env.project_version}.jar /usr/bin/alfresco-docker-libreoffice.jar && \
|
||||
yum install -y cairo cups-libs libSM && \
|
||||
wget $LIBREOFFICE_RPM_URL && \
|
||||
wget $LIBREOFFICE_LICENSE_FILE && \
|
||||
tar xzf libreoffice-dist-*-linux.gz && \
|
||||
test -f libreoffice-dist-5.4.6-linux.gz && \
|
||||
mv libreoffice-dist-5.4.6-linux.gz libreoffice-dist-linux.gz || \
|
||||
curl -s -S $LIBREOFFICE_RPM_URL -o libreoffice-dist-linux.gz && \
|
||||
curl -s -S $LIBREOFFICE_LICENSE_FILE -o libreoffice.txt && \
|
||||
tar xzf libreoffice-dist-linux.gz && \
|
||||
yum localinstall -y LibreOffice*/RPMS/*.rpm && \
|
||||
rm -rf libreoffice-dist-*-linux.gz LibreOffice_*_Linux_x86-64_rpm && \
|
||||
yum remove -y wget && \
|
||||
rm -rf libreoffice-dist-linux.gz LibreOffice_*_Linux_x86-64_rpm && \
|
||||
yum clean all
|
||||
|
||||
ADD target/generated-resources/licenses /licenses
|
||||
|
@ -75,7 +75,6 @@
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>fabric8-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<verbose/>
|
||||
<images>
|
||||
<image>
|
||||
<name>${image.name}:${image.tag}</name>
|
||||
@ -120,7 +119,6 @@
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>fabric8-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<verbose/>
|
||||
<images>
|
||||
<!-- QuayIO image -->
|
||||
<image>
|
||||
@ -162,7 +160,6 @@
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>fabric8-maven-plugin</artifactId>
|
||||
<configuration combine.self="override">
|
||||
<verbose/>
|
||||
<images>
|
||||
<!-- QuayIO image -->
|
||||
<image>
|
||||
|
@ -17,9 +17,7 @@ ARG USERID=33004
|
||||
COPY target/alfresco-docker-tika-${env.project_version}.jar /usr/bin
|
||||
|
||||
RUN ln /usr/bin/alfresco-docker-tika-${env.project_version}.jar /usr/bin/alfresco-docker-tika.jar && \
|
||||
yum install -y wget && \
|
||||
wget $APACHE_LICENSE_FILE && \
|
||||
yum remove -y wget && \
|
||||
curl -s -S $APACHE_LICENSE_FILE -o Apache\ 2.0.txt && \
|
||||
yum clean all
|
||||
|
||||
ADD target/generated-resources/licenses /licenses
|
||||
|
@ -139,7 +139,6 @@
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>fabric8-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<verbose/>
|
||||
<images>
|
||||
<image>
|
||||
<name>${image.name}:${image.tag}</name>
|
||||
@ -184,7 +183,6 @@
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>fabric8-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<verbose/>
|
||||
<images>
|
||||
<!-- QuayIO image -->
|
||||
<image>
|
||||
@ -226,7 +224,6 @@
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>fabric8-maven-plugin</artifactId>
|
||||
<configuration combine.self="override">
|
||||
<verbose/>
|
||||
<images>
|
||||
<!-- QuayIO image -->
|
||||
<image>
|
||||
|
Loading…
x
Reference in New Issue
Block a user