Merge pull request #1167 from Alfresco/feature-2.7/APPS-235_SetupEnv_no

Apps 235 Setup environment

(cherry picked from commit 23cddd2753)
This commit is contained in:
Claudia Agache
2020-07-08 14:10:04 +03:00
committed by rodicasutu
parent 7b448be646
commit c62f64c704
4 changed files with 122 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
# fail script immediately on any errors in external commands and print the lines
set -ev
outputFile="$TRAVIS_BUILD_DIR/$1/alf-installer.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${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}${S3_INSTALLER_PATH} -o ${outputFile}