From cc83d828d05746c769f1cea8120a85c58fbfd2e1 Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Wed, 8 Jul 2020 12:37:44 +0300 Subject: [PATCH] code review comments --- .travis.yml | 14 +++++++------- scripts/downloadInstaller.sh | 5 ++--- travis-env-vars.yml | 5 +++++ 3 files changed, 14 insertions(+), 10 deletions(-) create mode 100644 travis-env-vars.yml diff --git a/.travis.yml b/.travis.yml index 0587c7beb3..8e13f1fbb8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,5 @@ +import: + - source: travis-env-vars.yml os: linux dist: xenial language: java @@ -11,12 +13,6 @@ branches: - /merge-2.7\/.*/ - /hotfix-2.7\/.*/ -env: - global: - - 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 - cache: directories: - $HOME/.m2 @@ -78,7 +74,11 @@ jobs: - travis_retry travis_wait 90 mvn -B install -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -DskipTests -q - travis_wait 5 bash scripts/downloadInstaller.sh $AUTOMATION_COMMUNITY_PATH/target install: travis_wait 20 mvn install -Pinstall-alfresco,apply-rm-community -q -f $AUTOMATION_COMMUNITY_PATH/pom.xml - script: travis_wait 90 mvn -B install -Prun-alfresco -Dskip.automationtests=false -f $AUTOMATION_COMMUNITY_PATH/pom.xml + script: + - echo "Community Rest API Tests" +# Uncomment following line to start alfresco env using run-alfresco profile and run the tests. +# Currently commented because running tests is part of APPS-236 task +# travis_wait 90 mvn -B install -Prun-alfresco -Dskip.automationtests=false -f $AUTOMATION_COMMUNITY_PATH/pom.xml - name: "Enterprise Rest API Tests" stage: Tests before_install: diff --git a/scripts/downloadInstaller.sh b/scripts/downloadInstaller.sh index 6b9d3289c1..7754544c99 100644 --- a/scripts/downloadInstaller.sh +++ b/scripts/downloadInstaller.sh @@ -3,16 +3,15 @@ set -ev 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" dateValue=`TZ=GMT date -R` -stringToSign="GET\n\n${contentType}\n${dateValue}\n${amzFile}" +stringToSign="GET\n\n${contentType}\n${dateValue}\n$S3_INSTALLER_PATH" signature=`echo -en ${stringToSign} | openssl sha1 -hmac $RELEASE_AWS_SECRET_KEY -binary | base64` curl -H "Host: ${host}" \ -H "Date: ${dateValue}" \ -H "Content-Type: ${contentType}" \ -H "Authorization: AWS $RELEASE_AWS_ACCESS_KEY:${signature}" \ - https://${host}${amzFile} -o ${outputFile} + https://${host}${S3_INSTALLER_PATH} -o ${outputFile} ls "$TRAVIS_BUILD_DIR/$1" diff --git a/travis-env-vars.yml b/travis-env-vars.yml new file mode 100644 index 0000000000..da5c33ff9f --- /dev/null +++ b/travis-env-vars.yml @@ -0,0 +1,5 @@ +env: + global: + - 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