test: checkout object

This commit is contained in:
Naramsim 2024-06-03 05:43:53 +02:00
parent 1147a56970
commit 92e8671b8e
3 changed files with 7 additions and 4 deletions

View file

@ -98,6 +98,6 @@ jobs:
bash Resources/scripts/wait.sh http://localhost:8001/api/v1/namespaces/pokeapi/services/pokeapi/proxy/api/v2/pal-park-area/5/
- name: K8s wait for job
run: |
kubectl wait --timeout=120s --for=condition=complete job/load-graphql
kubectl wait --timeout=1020s --for=condition=complete job/load-graphql
last_command=$(kubectl get job -o jsonpath='{.status.succeeded}' load-graphql)
test "$last_command" -eq 1

View file

@ -1,2 +1,3 @@
ADMINS=PokeAPI,change.me@pokeapi.co
BASE_URL=http://localhost/
POKEAPI_CHECKOUT_REF=master

View file

@ -25,13 +25,15 @@ spec:
secretKeyRef:
name: graphql-env-secret
key: HASURA_GRAPHQL_ADMIN_SECRET
envFrom:
- configMapRef:
name: pokeapi-configmap
command: ["sh", "-c"]
args:
- apt-get update &&
apt-get install -y git curl &&
curl -L https://github.com/hasura/graphql-engine/raw/stable/cli/get.sh | bash &&
hasura update-cli --version v2.36.4 &&
curl -L https://github.com/hasura/graphql-engine/raw/stable/cli/get.sh | VERSION=v2.36.4 bash &&
git clone https://github.com/PokeAPI/pokeapi.git &&
cd pokeapi &&
git checkout staging &&
git checkout $(POKEAPI_CHECKOUT_REF) | git checkout master &&
hasura md apply --endpoint http://graphql:8080 --project graphql --admin-secret $(HASURA_GRAPHQL_ADMIN_SECRET)