Skip to content

Commit

Permalink
Merge pull request #3594 from uselagoon/testing/DWP_wait
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon authored Nov 14, 2023
2 parents eee3dab + bb9e1ba commit 296bf4c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ wait-for-keycloak:
grep -m 1 "Config of Keycloak done." <(docker-compose -p $(CI_BUILD_TAG) --compatibility logs -f keycloak 2>&1)

# Define a list of which Lagoon Services are needed for running any deployment testing
main-test-services = actions-handler broker logs2notifications api api-db api-redis keycloak keycloak-db ssh auth-server local-git local-api-data-watcher-pusher local-minio local-minio-upload
main-test-services = actions-handler broker logs2notifications api api-db api-redis keycloak keycloak-db ssh auth-server local-git local-api-data-watcher-pusher local-minio

# List of Lagoon Services needed for webhook endpoint testing
webhooks-test-services = webhook-handler webhooks2tasks backup-handler
Expand Down Expand Up @@ -354,7 +354,7 @@ api-development: build-ui-logs-development

.PHONY: ui-logs-development
ui-logs-development: build-ui-logs-development
IMAGE_REPO=$(CI_BUILD_TAG) docker-compose -p $(CI_BUILD_TAG) --compatibility up -d api api-db actions-handler local-api-data-watcher-pusher ui keycloak keycloak-db broker api-redis logs2notifications local-minio local-minio-upload mailhog
IMAGE_REPO=$(CI_BUILD_TAG) docker-compose -p $(CI_BUILD_TAG) --compatibility up -d api api-db actions-handler local-api-data-watcher-pusher ui keycloak keycloak-db broker api-redis logs2notifications local-minio mailhog

## CI targets

Expand Down
9 changes: 9 additions & 0 deletions local-dev/api-data-watcher-pusher/data-init-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ populate_demo_lagoon_org_gql_file_path="/home/api-data/02-populate-api-data-lago
populate_ci_local_control_k8s_gql_file_path="/home/api-data/03-populate-api-data-ci-local-control-k8s.gql"
sample_task_file_path="/home/minio-data/task-files/sample-task-file.txt"

wait_for_services() {
echo "waiting for ${API_HOST:-api}:${API_PORT:-3000}"
wait-for ${API_HOST:-api}:${API_PORT:-3000} -t 600
echo "connected to API"
}

send_graphql_query() {
local file_path=${1}

Expand Down Expand Up @@ -46,6 +52,9 @@ send_task_data() {
-F 0=@${file_path}
}

# Waiting for the API to be ready
wait_for_services

# Optionally clear *some* API data prior to reloading - not really necessary any more
# send_graphql_query $clear_gql_file_path

Expand Down

0 comments on commit 296bf4c

Please sign in to comment.