Skip to content

Commit

Permalink
Add redishost variables for the service check
Browse files Browse the repository at this point in the history
  • Loading branch information
m4dcoder committed May 6, 2021
1 parent ac615e7 commit 90d7991
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .circle/docker-compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set -e
# Source the build environment defintion (details in buildenv.sh)
. ~/.buildenv

# Used for `RABBITMQHOST` `MONGODBHOST`, see docker-compose.override.yml
# Used for `RABBITMQHOST`, `MONGODBHOST`, and `REDISHOST` see docker-compose.override.yml
HOST_IP=$(ifconfig docker0 | grep 'inet addr' | awk -F: '{print $2}' | awk '{print $1}')

set -x
Expand All @@ -26,6 +26,7 @@ case "$1" in
-e ST2PKG_RELEASE=${ST2PKG_RELEASE} \
-e RABBITMQHOST=${HOST_IP} \
-e MONGODBHOST=${HOST_IP} \
-e REDISHOST=${HOST_IP} \
-e ST2_CIRCLE_URL=${CIRCLE_BUILD_URL} \
$2 /bin/true
;;
Expand All @@ -38,6 +39,7 @@ case "$1" in
-e ST2PKG_RELEASE=${ST2PKG_RELEASE} \
-e RABBITMQHOST=${HOST_IP} \
-e MONGODBHOST=${HOST_IP} \
-e REDISHOST=${HOST_IP} \
-e ST2_PACKAGES="${ST2_PACKAGES}" \
-e ST2_CIRCLE_URL=${CIRCLE_BUILD_URL} \
$2 build
Expand All @@ -52,6 +54,7 @@ case "$1" in
-e ST2PKG_RELEASE=${ST2PKG_RELEASE} \
-e RABBITMQHOST=${HOST_IP} \
-e MONGODBHOST=${HOST_IP} \
-e REDISHOST=${HOST_IP} \
-e ST2_PACKAGES="${ST2_PACKAGES}" \
-e ST2_CIRCLE_URL=${CIRCLE_BUILD_URL} \
$2 test
Expand Down
1 change: 1 addition & 0 deletions rake/build/environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
# Default hostnames of dependat services (the value can take an address also)
envpass :rabbitmqhost, 'rabbitmq', proc: convert_to_ipaddr
envpass :mongodbhost, 'mongodb', proc: convert_to_ipaddr
envpass :redishost, 'redis', proc: convert_to_ipaddr

# upload_sources - a list of directories which should be propogated
# to remote nodes.
Expand Down
1 change: 1 addition & 0 deletions rake/spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class ST2Spec
package_list: pipeopts.packages,
rabbitmqhost: pipeopts.rabbitmqhost,
mongodbhost: pipeopts.mongodbhost,
redishost: pipeopts.redishost,
loglines_to_show: 100,
logdest_pattern: {
st2actionrunner: 'st2actionrunner.{pid}'
Expand Down

0 comments on commit 90d7991

Please sign in to comment.