Skip to content

Commit

Permalink
Merge branch 'schema-tracking'
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewazores committed Mar 20, 2024
2 parents 8836711 + 39a96e5 commit 50a5024
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions schema/update.bash
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,23 @@ DIR="$(dirname "$(readlink -f "$0")")"
"${DIR}"/../mvnw -f "${DIR}/../pom.xml" -B -U clean compile test-compile
"${DIR}"/../mvnw -f "${DIR}/../pom.xml" -B -U -DskipTests -Dspotless.check.skip -Dquarkus.smallrye-openapi.info-title="Cryostat API" clean quarkus:dev &
pid="$!"
function cleanup() {
kill $pid
}
trap cleanup EXIT
set +e
sleep 30
wget --spider http://localhost:8181/health
while [ $? -ne 0 ]; do !! ; sleep 10 ; done
counter=0
while true; do
if [ "${counter}" -gt 10 ]; then
exit 1
fi
if wget --spider http://localhost:8181/health; then
break
else
counter=$((counter + 1))
sleep 10
fi
done
wget http://localhost:8181/api -O - | yq -P 'sort_keys(..)' > "${DIR}/openapi.yaml"
wget http://localhost:8181/api/v3/graphql/schema.graphql -O "${DIR}/schema.graphql"
kill $pid

0 comments on commit 50a5024

Please sign in to comment.