comparison scripts/ciPushToAws.sh @ 19:02c83c12d3d5

added jenkins build
author am@osimis.io
date Thu, 19 Jul 2018 15:04:00 +0200
parents
children
comparison
equal deleted inserted replaced
15:e252d740436f 19:02c83c12d3d5
1 #!/usr/bin/env bash
2 # Builds the MSSQL Orthanc plugin Docker image
3 # Arguments:
4 # $1 - Git branch name
5
6 set -e # Stop on error
7 set -u # Stop on uninitialized variable
8 set -x # Trace execution
9
10 branchName=${1:-$(hg branch)} #if no argument defined, get the branch name from git
11 commitId=$(hg identify --id)
12
13 if [[ $branchName == "default" ]]; then
14 releaseTag=$commitId
15 else
16 releaseTag=$branchName
17 fi
18
19 docker run --rm -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY --entrypoint bash osimis/orthanc-authorization-plugin -c \
20 "aws s3 --region eu-west-1 cp /usr/local/share/orthanc/plugins/libOrthancAuthorization.so s3://orthanc.osimis.io/docker-so/orthanc-authorization/$releaseTag/ --cache-control max-age=1"