mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-13 19:33:55 +03:00
CI: Upgrade ci-util to use the latest Ubuntu and Docker patches.
It's been a while. PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9440 GitOrigin-RevId: 15d3dabd23ae640ea1d6afeea2be9d59176c19e7
This commit is contained in:
parent
60ba0566db
commit
092be72ac1
@ -20,13 +20,13 @@ wait_for_server() {
|
||||
curl -L https://raw.githubusercontent.com/hasura/graphql-engine/stable/install-manifests/docker-compose/docker-compose.yaml -o docker-compose-latest.yaml
|
||||
sed -i '/hasura\/graphql-engine:/ s/$/.cli-migrations-v2\n container_name: graphql-engine/' docker-compose-latest.yaml
|
||||
# start postgres
|
||||
docker-compose -f docker-compose-latest.yaml up --no-start graphql-engine
|
||||
docker compose -f docker-compose-latest.yaml up --no-start graphql-engine
|
||||
# copy migrations directory to /hasura-migrations
|
||||
docker cp migrations/. graphql-engine:/hasura-migrations
|
||||
# copy metadata directory to /hasura-metadata
|
||||
docker cp metadata/. graphql-engine:/hasura-metadata
|
||||
# start graphql-engine
|
||||
docker-compose -f docker-compose-latest.yaml up -d --no-recreate graphql-engine
|
||||
docker compose -f docker-compose-latest.yaml up -d --no-recreate graphql-engine
|
||||
wait_for_server
|
||||
# export metadata and run diff with validation/metadata.json
|
||||
docker run --rm --network container:graphql-engine curlimages/curl -s -f -d'{"type" : "export_metadata", "args" : {} }' localhost:8080/v1/query | jq -j '.' | diff validation/metadata.json -
|
||||
@ -34,11 +34,11 @@ docker run --rm --network container:graphql-engine curlimages/curl -s -f -d'{"
|
||||
docker run --rm --network container:graphql-engine curlimages/curl -s -f -d'{"type" : "run_sql", "args" : {"sql": "select * from hdb_catalog.schema_migrations"} }' localhost:8080/v1/query | jq -j '.' | diff validation/schema_migrations.json -
|
||||
|
||||
# use the current build to start container
|
||||
docker-compose up -d
|
||||
docker compose up -d
|
||||
wait_for_server
|
||||
# export metadata and run diff with validation/metadata.json
|
||||
docker run --rm --network container:graphql-engine curlimages/curl -s -f -d'{"type" : "export_metadata", "args" : {} }' localhost:8080/v1/query | jq -j '.' | diff validation/metadata.json -
|
||||
# get list of migrations applied from graphql-engine server
|
||||
docker run --rm --network container:graphql-engine curlimages/curl -s -f -d'{"type" : "run_sql", "args" : {"sql": "select * from hdb_catalog.schema_migrations"} }' localhost:8080/v1/query | jq -j '.' | diff validation/schema_migrations.json -
|
||||
# delete postgres and graphql-engine
|
||||
docker-compose down -v
|
||||
docker compose down -v
|
||||
|
@ -29,17 +29,17 @@ wait_for_server() {
|
||||
}
|
||||
|
||||
# start postgres
|
||||
docker-compose up --no-start graphql-engine
|
||||
docker compose up --no-start graphql-engine
|
||||
# copy migrations directory to /hasura-migrations
|
||||
docker cp migrations/. graphql-engine:/hasura-migrations
|
||||
# copy metadata directory to /hasura-metadata
|
||||
docker cp metadata/. graphql-engine:/hasura-metadata
|
||||
# start graphql-engine
|
||||
docker-compose up -d --no-recreate graphql-engine
|
||||
docker compose up -d --no-recreate graphql-engine
|
||||
wait_for_server
|
||||
# export metadata and run diff with validation/metadata.json
|
||||
docker run --rm --network container:graphql-engine curlimages/curl -s -f -d'{"type" : "export_metadata", "args" : {} }' localhost:8080/v1/query | jq -j '.' | diff validation/metadata.json -
|
||||
# get list of migrations applied from graphql-engine server
|
||||
docker run --rm --network container:graphql-engine curlimages/curl -s -f -d'{"type" : "run_sql", "args" : {"sql": "select * from hdb_catalog.schema_migrations"} }' localhost:8080/v1/query | jq -j '.' | diff validation/schema_migrations.json -
|
||||
# delete postgres and graphql-engine
|
||||
docker-compose down -v
|
||||
docker compose down -v
|
||||
|
@ -26,17 +26,17 @@ wait_for_server() {
|
||||
}
|
||||
|
||||
# start postgres
|
||||
docker-compose up --no-start graphql-engine
|
||||
docker compose up --no-start graphql-engine
|
||||
# copy migrations directory to /hasura-migrations
|
||||
docker cp migrations/. graphql-engine:/hasura-migrations
|
||||
# copy metadata directory to /hasura-metadata
|
||||
docker cp metadata/. graphql-engine:/hasura-metadata
|
||||
# start graphql-engine
|
||||
docker-compose up -d --no-recreate graphql-engine
|
||||
docker compose up -d --no-recreate graphql-engine
|
||||
wait_for_server
|
||||
# export metadata and run diff with validation/metadata.json
|
||||
docker run --rm --network container:graphql-engine curlimages/curl -s -f -d'{"type" : "export_metadata", "args" : {} }' localhost:8080/v1/metadata | jq -j '.' | diff validation/metadata.json -
|
||||
# get list of migrations applied from graphql-engine server
|
||||
docker run --rm --network container:graphql-engine curlimages/curl -s -f -d'{"type" : "get_catalog_state", "args" : {} }' localhost:8080/v1/metadata | jq .cli_state | diff validation/catalog_cli_state.json -
|
||||
# delete postgres and graphql-engine
|
||||
docker-compose down -v
|
||||
docker compose down -v
|
||||
|
Loading…
Reference in New Issue
Block a user