From e98b34f68dd32dbe152900693f59d9b502e8867c Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Mon, 6 Jul 2020 19:32:32 +0300 Subject: [PATCH] add automation target directories to cache, download installer to target instead of rm-automation root --- .travis.yml | 15 +++++++++++++-- rm-automation/pom.xml | 6 +++--- scripts/downloadInstaller.sh | 2 +- scripts/startAlfresco.sh | 9 ++------- 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8301237fa4..94d8ac7ab3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,14 @@ branches: - /merge-2.7\/.*/ - /hotfix-2.7\/.*/ +env: + - AUTOMATION_COMMUNITY_PATH=rm-automation/rm-automation-community-rest-api + - AUTOMATION_ENTERPRISE_PATH=rm-automation/rm-automation-enterprise-rest-api + - AUTOMATION_UI_PATH=rm-automation/rm-automation-ui + - AUTOMATION_COMMUNITY_TARGET=$AUTOMATION_COMMUNITY_PATH/target + - AUTOMATION_ENTERPRISE_TARGET=$AUTOMATION_ENTERPRISE_PATH/target + - AUTOMATION_UI_TARGET=$AUTOMATION_UI_PATH/target + cache: directories: - $HOME/.m2 @@ -18,6 +26,9 @@ cache: - rm-community/rm-community-share/target - rm-enterprise/rm-enterprise-repo/target - rm-enterprise/rm-enterprise-share/target + - $AUTOMATION_COMMUNITY_TARGET + - $AUTOMATION_ENTERPRISE_TARGET + - $AUTOMATION_UI_TARGET # the cache can grow constantly before_cache: - rm -rf $HOME/.m2/repository/org/alfresco/alfresco-rm* @@ -62,9 +73,9 @@ jobs: - echo "Enterprise Integrations Tests on MySQL" - name: "Community Rest API Tests" stage: Tests - before_install: travis_wait 60 bash scripts/downloadInstaller.sh + before_install: travis_wait 60 bash scripts/downloadInstaller.sh $AUTOMATION_COMMUNITY_TARGET install: - - travis_wait 60 bash scripts/startAlfresco.sh apply-rm-community + - travis_wait 60 bash scripts/startAlfresco.sh AUTOMATION_COMMUNITY_PATH apply-rm-community script: - echo "Community Rest API Tests" - name: "Enterprise Rest API Tests" diff --git a/rm-automation/pom.xml b/rm-automation/pom.xml index 2d41884b6e..682b50d656 100644 --- a/rm-automation/pom.xml +++ b/rm-automation/pom.xml @@ -147,12 +147,12 @@ Recreating database... drop database if exists alfresco; create database alfresco - + Installing Alfresco... - + - + diff --git a/scripts/downloadInstaller.sh b/scripts/downloadInstaller.sh index deb88d252a..b0dd988339 100644 --- a/scripts/downloadInstaller.sh +++ b/scripts/downloadInstaller.sh @@ -2,7 +2,7 @@ # fail script immediately on any errors in external commands and print the lines set -ev -outputFile="$TRAVIS_BUILD_DIR/rm-automation/alf-installer.bin" +outputFile="$TRAVIS_BUILD_DIR/$1/alf-installer.bin" amzFile="/eu.dl.alfresco.com/release/enterprise/5.2/5.2.7/5.2.7.4/alfresco-content-services-installer-5.2.7.4-linux-x64.bin" host="s3-eu-west-1.amazonaws.com" contentType="binary/octet-stream" diff --git a/scripts/startAlfresco.sh b/scripts/startAlfresco.sh index b342531138..1755190877 100644 --- a/scripts/startAlfresco.sh +++ b/scripts/startAlfresco.sh @@ -2,10 +2,5 @@ # fail script immediately on any errors in external commands and print the lines set -ev -export PROFILE=$1 - -ls rm-enterprise/rm-enterprise-repo/target -ls rm-enterprise/rm-enterprise-share/target -cd rm-automation -ls -mvn install -Pinstall-alfresco,${PROFILE} -q +cd $1 +mvn install -Pinstall-alfresco,$2 -q