Skip to content

Commit

Permalink
Update build.sh (main and login) to force variable use
Browse files Browse the repository at this point in the history
  • Loading branch information
pclastre committed Jul 1, 2020
1 parent 2f478d5 commit fd9a33a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
9 changes: 9 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,15 @@ export IN_SYLVA_SEARCH_PORT=$(grep IN_SYLVA_SEARCH_PORT ipconfig.txt| awk '{prin
export IN_SYLVA_SEARCH_HOST=$(grep IN_SYLVA_SEARCH_HOST ipconfig.txt| awk '{print $2}')
export IN_SYLVA_SEARCH_PORT=$(grep IN_SYLVA_LOGIN_PORT ipconfig.txt| awk '{print $2}')
export IN_SYLVA_SEARCH_HOST=$(grep IN_SYLVA_LOGIN_HOST ipconfig.txt| awk '{print $2}')
export IN_SYLVA_KEYCLOAK_HOST_FOR_LOGIN="${DOMAIN}search/keycloak"
export IN_SYLVA_PORTAL_HOST_FOR_LOGIN="${DOMAIN}portal"
export IN_SYLVA_SEARCH_HOST_FOR_LOGIN="${DOMAIN}search"
export IN_SYLVA_GATEKEEPER_HOST_FOR_LOGIN="${DOMAIN}portal/gatekeeper"

echo $IN_SYLVA_KEYCLOAK_HOST_FOR_LOGIN
echo $IN_SYLVA_PORTAL_HOST_FOR_LOGIN
echo $IN_SYLVA_SEARCH_HOST_FOR_LOGIN
echo $IN_SYLVA_GATEKEEPER_HOST_FOR_LOGIN

# Control for elasticsearch and host parameters
val=0$(grep vm.max_map_count /etc/sysctl.conf | awk -F"=" '{print $2}')
Expand Down
19 changes: 5 additions & 14 deletions login/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,13 @@ docker build --no-cache --build-arg SSH_KEY="$SSH_KEY" --build-arg SSH_KEY_PASSP
--build-arg IN_SYLVA_CLIENT_ID="in-sylva.user.app" \
--build-arg IN_SYLVA_GRANT_TYPE="password" \
--build-arg IN_SYLVA_REALM="in-sylva" \
--build-arg IN_SYLVA_KEYCLOAK_HOST="w3.avignon.inra.fr/bas_insylva/search/keycloak" \
--build-arg IN_SYLVA_KEYCLOAK_HOST="$IN_SYLVA_KEYCLOAK_HOST_FOR_LOGIN" \
--build-arg IN_SYLVA_KEYCLOAK_PORT="7000" \
--build-arg IN_SYLVA_PORTAL_HOST="w3.avignon.inra.fr/bas_insylva/portal" \
--build-arg IN_SYLVA_SEARCH_HOST="w3.avignon.inra.fr/bas_insylva/search" \
--build-arg IN_SYLVA_GATEKEEPER_HOST="w3.avignon.inra.fr/bas_insylva/portal/gatekeeper" \
--build-arg IN_SYLVA_PORTAL_HOST="$IN_SYLVA_PORTAL_HOST_FOR_LOGIN" \
--build-arg IN_SYLVA_SEARCH_HOST="$IN_SYLVA_SEARCH_HOST_FOR_LOGIN" \
--build-arg IN_SYLVA_GATEKEEPER_HOST="$IN_SYLVA_GATEKEEPER_HOST_FOR_LOGIN" \
--build-arg IN_SYLVA_GATEKEEPER_PORT="4000" \
--tag in-sylva.user.login ./login/.

# Note: The variables above could not set values from ipconfig.txt by build.sh
# Please notice, the variables should be set as aboves.

# --build-arg IN_SYLVA_KEYCLOAK_HOST=$IN_SYLVA_KEYCLOAK_HOST \
# --build-arg IN_SYLVA_KEYCLOAK_PORT=$IN_SYLVA_KEYCLOAK_PORT \
# --build-arg IN_SYLVA_PORTAL_HOST=$IN_SYLVA_PORTAL_HOST \
# --build-arg IN_SYLVA_PORTAL_PORT=$IN_SYLVA_PORTAL_PORT \
# --build-arg IN_SYLVA_SEARCH_HOST=$IN_SYLVA_SEARCH_HOST \
# --build-arg IN_SYLVA_SEARCH_PORT=$IN_SYLVA_SEARCH_PORT \
# --build-arg IN_SYLVA_GATEKEEPER_HOST=$IN_SYLVA_GATEKEEPER_HOST \
# --build-arg IN_SYLVA_GATEKEEPER_PORT=$IN_SYLVA_GATEKEEPER_PORT \
# Variables used in this script are defined by the main build.sh

0 comments on commit fd9a33a

Please sign in to comment.