Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 1 addition & 28 deletions bin/aws_include.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,9 @@
# The POSSIBLE_AWS_SERVERS names must match the [profile <name>] in
# ~/.aws/config
POSSIBLE_AWS_SERVERS='staging|azure|prod|dnb|stacc|modulr'
POSSIBLE_AWS_SERVERS='staging'
AWS_VAULT_ENV_FILE_BASE=~/.aws/aws_vault_env

S3_PATH_STAGING="s3://merkely-temp"
S3_PATH_PROD="s3://merkely-prod-temp"
S3_PATH_DNB="s3://merkely-dnb-temp"
S3_PATH_STACC="s3://merkely-stacc-temp"
S3_PATH_MODULR="s3://merkely-modulr-temp"

## Disabled for now since Ewelinca has bash version 3.x.x
## Bash associative array
#declare -A S3_PATHS
#S3_PATHS[staging]="s3://merkely-temp"
##S3_PATHS[azure]=
#S3_PATHS[prod]="s3://merkely-prod-temp"
#S3_PATHS[dnb]="s3://merkely-dnb-temp"
#S3_PATHS[stacc]="s3://merkely-stacc-temp"
#S3_PATHS[modulr]="s3://merkely-modulr-temp"


# Notes about AWS tools.
# For commands that execute 'aws ecs' commands it is necessary
Expand Down Expand Up @@ -187,15 +172,3 @@ get_s3_path()
;;
esac
}

## Disabled for now since Ewelinca has bash version 3.x.x
#get_s3_path()
#{
# local awsServerName=$1; shift
# if [ ${S3_PATHS[$awsServerName]+_} ]; then
# echo ${S3_PATHS[$awsServerName]}
# return 0
# else
# return 1
# fi
#}
10 changes: 8 additions & 2 deletions bin/docker_login_aws.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
#!/bin/bash -Eeu
#!/usr/bin/env bash
set -Eeu

SCRIPT_NAME=docker_login_aws.sh
HELP_STRING="Does a docker login to AWS so we can fetch repositories from it"
SCRIPT_DIR=$(dirname $(readlink -f $0))
source ${SCRIPT_DIR}/aws_include.sh

if [ -n "${CI:-}" ]; then
source ${SCRIPT_DIR}/aws_include.sh
else
source ${SCRIPT_DIR}/../../server/bin/aws_include.sh
fi

get_aws_account_id()
{
Expand Down
Loading