mirror of
https://github.com/GSA/notifications-api.git
synced 2026-05-02 07:10:14 -04:00
Create Docker build image, build project with Docker
This commit is contained in:
@@ -361,7 +361,6 @@ get_instance_name_from_tags() {
|
||||
error_exit "Couldn't get instance name for '$instance_id'"
|
||||
fi
|
||||
echo $instance_name
|
||||
echo $instance_id
|
||||
return $?
|
||||
}
|
||||
|
||||
@@ -371,15 +370,12 @@ get_elb_name_for_instance_name() {
|
||||
local instance_name=$1
|
||||
|
||||
declare -A elb_to_instance_mapping
|
||||
|
||||
|
||||
elb_to_instance_mapping['notify-api']='notify-api'
|
||||
elb_to_instance_mapping['notify-admin-api']='notify-admin-api'
|
||||
|
||||
elb_to_instance_mapping['notify_api']='notify-api-elb'
|
||||
elb_to_instance_mapping['notify_admin_api']='notify-admin-api-elb'
|
||||
elb_to_instance_mapping['live_notify_api']='live-notify-api-elb'
|
||||
elb_to_instance_mapping['staging_notify_api']='staging-notify-api-elb'
|
||||
elb_to_instance_mapping['NotifyApi']='notify-api-elb'
|
||||
elb_to_instance_mapping['live_notify_admin_api']='live-notify-admin-api-elb'
|
||||
elb_to_instance_mapping['staging_notify_admin_api']='staging-notify-admin-api-elb'
|
||||
elb_to_instance_mapping['NotifyAdminApi']='notify-admin-api-elb'
|
||||
|
||||
local elb_name=${elb_to_instance_mapping[${instance_name}]}
|
||||
if [ -z $elb_name ]; then
|
||||
@@ -387,4 +383,4 @@ get_elb_name_for_instance_name() {
|
||||
else
|
||||
ELB_NAME=$elb_name
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@ msg "Started $(basename $0) at $(/bin/date "+%F %T")"
|
||||
start_sec=$(/bin/date +%s.%N)
|
||||
|
||||
msg "Getting relevant load balancer"
|
||||
|
||||
INSTANCE_NAME=$(get_instance_name_from_tags $INSTANCE_ID)
|
||||
|
||||
if [[ "$(tr [:upper:] [:lower:] <<< "${INSTANCE_NAME}")" =~ 'delivery' ]]; then
|
||||
@@ -37,6 +36,7 @@ if [[ "$(tr [:upper:] [:lower:] <<< "${INSTANCE_NAME}")" =~ 'delivery' ]]; then
|
||||
fi
|
||||
|
||||
get_elb_name_for_instance_name $INSTANCE_NAME
|
||||
ELB_LIST=$ELB_NAME
|
||||
get_elb_list $INSTANCE_ID $ELB_NAME
|
||||
|
||||
msg "Checking that user set at least one load balancer"
|
||||
|
||||
@@ -24,6 +24,9 @@ function display_result {
|
||||
fi
|
||||
}
|
||||
|
||||
if [ -d venv ]; then
|
||||
source ./venv/bin/activate
|
||||
fi
|
||||
pep8 .
|
||||
display_result $? 1 "Code style check"
|
||||
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Update the version file of the project from the Travis build details
|
||||
#
|
||||
sed -i -e "s/__travis_commit__ =.*/__travis_commit__ = \"$TRAVIS_COMMIT\"/g" ./app/version.py
|
||||
sed -i -e "s/__travis_job_number__ =.*/__travis_job_number__ = \"$TRAVIS_BUILD_NUMBER\"/g" ./app/version.py
|
||||
sed -i -e "s/__time__ =.*/__time__ = \"$(date +%Y-%m-%d:%H:%M:%S)\"/g" ./app/version.py
|
||||
Reference in New Issue
Block a user