Skip to content

Commit

Permalink
nginx_port
Browse files Browse the repository at this point in the history
  • Loading branch information
Luc45 committed Feb 28, 2024
1 parent aea41b5 commit 982cc3a
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/qit-environment-test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,20 @@ jobs:
exit 1
fi
echo "Raw environment output: $ENV_OUTPUT"
URL=$(echo "$ENV_OUTPUT" | jq -r '.url')
if [ -z "$URL" ] || [ "$URL" = "null" ]; then
echo "URL not found in environment output"
NGINX_PORT=$(echo "$ENV_OUTPUT" | jq -r '.nginx_port')
if [ -z "$NGINX_PORT" ] || [ "$NGINX_PORT" = "null" ]; then
echo "nginx_port not found in environment output"
exit 1
fi
echo "ENV_URL=$URL" >> $GITHUB_ENV
echo "NGINX_PORT=$NGINX_PORT" >> $GITHUB_ENV
- name: Print environment URL
- name: Print nginx_port
run: |
echo "Environment URL: $ENV_URL"
echo "Nginx port: $NGINX_PORT"
- name: Test Site Up
run: |
STATUS_CODE=$(curl -s -o /dev/null -w "%{http_code}" $ENV_URL)
STATUS_CODE=$(curl -s -o /dev/null -w "%{http_code}" http://qit.test:$NGINX_PORT/)
if [ "$STATUS_CODE" -eq 200 ]; then
echo "Site is up"
else
Expand All @@ -72,5 +72,4 @@ jobs:
- name: Query WP JSON
run: |
curl -s "$ENV_URL/wp-json"
curl -s "http://qit.test:$NGINX_PORT/wp-json"

0 comments on commit 982cc3a

Please sign in to comment.