-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaws.env.test
More file actions
executable file
·90 lines (74 loc) · 2.73 KB
/
aws.env.test
File metadata and controls
executable file
·90 lines (74 loc) · 2.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/bin/bash
# We are using Bash Strict Mode (see http://redsymbol.net/articles/unofficial-bash-strict-mode/)
set -euo pipefail
IFS=$'\n\t'
# This script checks if all the variables we need for this environment have been set as environment variables.
# It should be run after the script aws.env is executed.
echo "START - Test if the environment variables have been correctly set"
if [ -z ${TRAVIS_AWS_PROFILE} ]; then
echo "We have no value for the AWS CLI profile we need to use - Exit with error"
exit 1
else
echo "AWS CLI profile in use is ${TRAVIS_AWS_PROFILE}"
fi
if [ -z ${INSTALLATION_ID} ]; then
echo "We have no value for the INSTALLATION_ID variable - Exit with error"
exit 1
else
echo "We have a INSTALLATION_ID variable: ${INSTALLATION_ID}"
fi
if [ -z ${STAGE} ]; then
echo "We have no value for the STAGE variable - Exit with error"
exit 1
else
echo "We have a STAGE variable: ${STAGE}"
fi
if [ -z ${DOMAIN} ]; then
echo "We have no value for the DOMAIN variable - Exit with error"
exit 1
else
echo "We have a DOMAIN variable: ${DOMAIN}"
fi
if [ -z ${DEFAULT_REGION} ]; then
echo "We have no value for the DEFAULT_REGION variable - Exit with error"
exit 1
else
echo "We have a DEFAULT_REGION variable: ${DEFAULT_REGION}"
fi
if [ -z ${MYSQL_HOST} ]; then
echo "We have no value for the MYSQL_HOST variable - Exit with error"
exit 1
else
echo "We have a MYSQL_HOST variable: ${MYSQL_HOST}"
fi
if [ -z ${MYSQL_PORT} ]; then
echo "We have no value for the MYSQL_PORT variable - Exit with error"
exit 1
else
echo "We have a MYSQL_PORT variable: ${MYSQL_PORT}"
fi
if [ -z ${BUGZILLA_DB_NAME} ]; then
echo "We have no value for the BUGZILLA_DB_NAME variable - Exit with error"
exit 1
else
echo "We have a BUGZILLA_DB_NAME variable: ${BUGZILLA_DB_NAME}"
fi
if [ -z ${BUGZILLA_DB_USER} ]; then
echo "We have no value for the BUGZILLA_DB_USER variable - Exit with error"
exit 1
else
echo "We have a BUGZILLA_DB_USER variable: ${BUGZILLA_DB_USER}"
fi
if [ -z ${EMAIL_FOR_NOTIFICATION_UNIT} ]; then
echo "We have no value for the EMAIL_FOR_NOTIFICATION_UNIT variable - Exit with error"
exit 1
else
echo "We have a EMAIL_FOR_NOTIFICATION_UNIT variable: ${EMAIL_FOR_NOTIFICATION_UNIT}"
fi
if [ -z ${DEFAULT_SECURITY_GROUP} ]; then
echo "We have no value for the DEFAULT_SECURITY_GROUP variable - Exit with error"
exit 1
else
echo "We have a DEFAULT_SECURITY_GROUP variable: ${DEFAULT_SECURITY_GROUP}"
fi
echo "END - Test if the environment variables have been correctly set"