Skip to content

Commit

Permalink
set OVERWRITE_DOMAIN_URL via env variable in build_kubernetes.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
David Stritezsky committed Oct 3, 2020
1 parent 6989870 commit 77f225d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .ci/build_kubernetes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ cp project-base/config/parameters.yaml.dist project-base/config/parameters.yaml
yq write --inplace project-base/config/domains_urls.yaml domains_urls[0].url http://${FIRST_DOMAIN_HOSTNAME}:${NGINX_INGRESS_CONTROLLER_HOST_PORT}
yq write --inplace project-base/config/domains_urls.yaml domains_urls[1].url http://${SECOND_DOMAIN_HOSTNAME}:${NGINX_INGRESS_CONTROLLER_HOST_PORT}

# Change "overwrite_domain_url" parameter for Selenium tests as containers "webserver" and "php-fpm" are bundled together in a pod "webserver-php-fpm"
yq write --inplace project-base/config/parameters_test.yaml parameters.overwrite_domain_url http://webserver-php-fpm:8080

# Pull or build Docker images for the current commit
DOCKER_IMAGE_TAG=ci-commit-${GIT_COMMIT}
DOCKER_ELASTIC_IMAGE_TAG=ci-elasticsearch-7
Expand Down Expand Up @@ -55,6 +52,8 @@ DOCKER_ELASTIC_IMAGE=${DOCKER_USERNAME}/elasticsearch:${DOCKER_ELASTIC_IMAGE_TAG
PATH_CONFIG_DIRECTORY='/var/www/html/project-base/config'
GOOGLE_CLOUD_STORAGE_BUCKET_NAME=''
GOOGLE_CLOUD_PROJECT_ID=''
# Change "OVERWRITE_DOMAIN_URL" parameter for Selenium tests as containers "webserver" and "php-fpm" are bundled together in a pod "webserver-php-fpm"
OVERWRITE_DOMAIN_URL='http://webserver-php-fpm:8080'

FILES=$( find project-base/kubernetes -type f )
VARS=(
Expand All @@ -65,6 +64,7 @@ VARS=(
PATH_CONFIG_DIRECTORY
GOOGLE_CLOUD_STORAGE_BUCKET_NAME
GOOGLE_CLOUD_PROJECT_ID
OVERWRITE_DOMAIN_URL
)

for FILE in $FILES; do
Expand Down
4 changes: 4 additions & 0 deletions project-base/kubernetes/deployments/webserver-php-fpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ spec:
value: "{{GOOGLE_CLOUD_STORAGE_BUCKET_NAME}}"
- name: GOOGLE_CLOUD_PROJECT_ID
value: "{{GOOGLE_CLOUD_PROJECT_ID}}"
- name: OVERWRITE_DOMAIN_URL
value: "{{OVERWRITE_DOMAIN_URL}}"
containers:
- image: "{{DOCKER_PHP_FPM_IMAGE}}"
name: php-fpm
Expand All @@ -96,6 +98,8 @@ spec:
value: "{{GOOGLE_CLOUD_STORAGE_BUCKET_NAME}}"
- name: GOOGLE_CLOUD_PROJECT_ID
value: "{{GOOGLE_CLOUD_PROJECT_ID}}"
- name: OVERWRITE_DOMAIN_URL
value: "{{OVERWRITE_DOMAIN_URL}}"
- image: nginx:1.13.10-alpine
name: webserver
ports:
Expand Down

0 comments on commit 77f225d

Please sign in to comment.