Mercurial > hg > orthanc-authorization
diff scripts/ciPushToAws.sh @ 19:02c83c12d3d5
added jenkins build
author | am@osimis.io |
---|---|
date | Thu, 19 Jul 2018 15:04:00 +0200 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/ciPushToAws.sh Thu Jul 19 15:04:00 2018 +0200 @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +# Builds the MSSQL Orthanc plugin Docker image +# Arguments: +# $1 - Git branch name + +set -e # Stop on error +set -u # Stop on uninitialized variable +set -x # Trace execution + +branchName=${1:-$(hg branch)} #if no argument defined, get the branch name from git +commitId=$(hg identify --id) + +if [[ $branchName == "default" ]]; then + releaseTag=$commitId +else + releaseTag=$branchName +fi + +docker run --rm -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY --entrypoint bash osimis/orthanc-authorization-plugin -c \ + "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" \ No newline at end of file