orchestrator-setup/scripts/entrypoint.sh

25 lines
1.3 KiB
Bash
Executable File

#!/bin/sh
export BASE="http://conductorserver:8080/api"
until $(curl --output /dev/null --silent --fail $BASE/health); do
printf '.'
sleep 5
done
printf 'Contact ... starting upload'
curl -s -o /dev/null -w "%{http_code}\n" -X POST -H 'Content-Type: application/json' -d @/var/resources/tasks/pytasks.json $BASE/metadata/taskdefs
curl -s -o /dev/null -w "%{http_code}\n" -X POST -H 'Content-Type: application/json' -d @/var/resources/workflows/portal/user-group-role_created.json $BASE/metadata/workflow
curl -s -o /dev/null -w "%{http_code}\n" -X POST -H 'Content-Type: application/json' -d @/var/resources/workflows/portal/user-group-role_deleted.json $BASE/metadata/workflow
curl -s -o /dev/null -w "%{http_code}\n" -X POST -H 'Content-Type: application/json' -d @/var/resources/workflows/portal/user-group_created.json $BASE/metadata/workflow
curl -s -o /dev/null -w "%{http_code}\n" -X POST -H 'Content-Type: application/json' -d @/var/resources/workflows/portal/user-group_deleted.json $BASE/metadata/workflow
curl -s -o /dev/null -w "%{http_code}\n" -X POST -H 'Content-Type: application/json' -d @/var/resources/workflows/portal/group_created.json $BASE/metadata/workflow
curl -s -o /dev/null -w "%{http_code}\n" -X POST -H 'Content-Type: application/json' -d @/var/resources/workflows/portal/group_deleted.json $BASE/metadata/workflow