Skip to content

Commit

Permalink
ci: add delay when loading thesauri in GN
Browse files Browse the repository at this point in the history
This will avoid the thesauri to somehow be wiped (??) during GN init, thus
making subsequent E2E fail
  • Loading branch information
jahow committed Aug 13, 2024
1 parent 42c124e commit c8c4ee7
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions support-services/docker-entrypoint.d/04-upload-thesauri.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ xsrf_token=$(cat /xsrf_token)

echo "Uploading thesauri to GeoNetwork..."

# we're waiting a bit here for GN to be ready to accept thesauri (i.e. the default ones are set up)
sleep 4

for f in /docker-entrypoint.d/thesauri/*.rdf
do
curl -s "http://$host/geonetwork/srv/api/registries/vocabularies" \
Expand All @@ -19,12 +22,12 @@ do
done

# this shows the registered thesauri in GN
#curl "http://$host/geonetwork/srv/fre/thesaurus?_content_type=json" \
# -H 'Accept: application/json, text/plain, */*' \
# -H 'Content-Type: multipart/form-data' \
# -H 'Accept: application/json, text/plain, */*' \
# -H "Cookie: JSESSIONID=$jsessionid; XSRF-TOKEN=$xsrf_token" \
# -H "X-XSRF-TOKEN: $xsrf_token"
#echo ""
curl -s --no-progress-meter "http://$host/geonetwork/srv/fre/thesaurus?_content_type=json" \
-H 'Accept: application/json, text/plain, */*' \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json, text/plain, */*' \
-H "Cookie: JSESSIONID=$jsessionid; XSRF-TOKEN=$xsrf_token" \
-H "X-XSRF-TOKEN: $xsrf_token"
echo ""

echo "Thesauri uploaded to GeoNetwork."

0 comments on commit c8c4ee7

Please sign in to comment.