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:
CezarLeahu
2019-05-20 13:38:44 +03:00
committed by GitHub
parent 27a55855fb
commit 053a6f16e8
10 changed files with 43 additions and 36 deletions

22
_ci/cache_artifacts.sh Normal file
View 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 =========================="