Skip to content

Commit

Permalink
fix cloudbuild to not use clone and deploy to cluster (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaMandal0rian authored Aug 23, 2024
1 parent 0aa2693 commit 5a8a4f5
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 22 deletions.
44 changes: 23 additions & 21 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,34 @@ options:
timeout: 1800s

steps:
- id: 'Checkout Kustomize Configuration'
name: 'gcr.io/cloud-builders/git'
env:
- 'GIT_AUTH_TOKEN=$_GITHUB_GRAPHIX_INFRA_PAT'
# Set the project ID
- name: 'gcr.io/cloud-builders/gcloud'
args: ['config', 'set', 'project', 'graph-mainnet']

# Authenticate to GKE cluster
- name: 'gcr.io/cloud-builders/gcloud'
args:
- 'clone'
- 'https://github.com/edgeandnode/graph-infra.git'
- 'container'
- 'clusters'
- 'get-credentials'
- 'testnet'
- '--zone=us-central1-a'
- '--project=graph-mainnet'

- id: 'Update Graphix Deployment'
name: 'gcr.io/cloud-builders/kubectl'
env:
- "CLOUDSDK_COMPUTE_ZONE=us-central1-a"
- "CLOUDSDK_CONTAINER_CLUSTER=testnet"
- "CLOUDSDK_CORE_PROJECT=graph-mainnet"
# Update the deployment to use the latest image
- name: 'gcr.io/cloud-builders/kubectl'
args:
- 'apply'
- '-k'
- 'graph-infra/graph-mainnet/testnet/k8s/graphix/environments/'
- 'set'
- 'image'
- 'deployment/graphix-cross-checker'
- 'graphix-cross-checker=ghcr.io/${_GITHUB_REPO_OWNER}/graphix:latest'

- id: 'Restart Graphix Deployment'
name: 'gcr.io/cloud-builders/kubectl'
env:
- "CLOUDSDK_COMPUTE_ZONE=us-central1-a"
- "CLOUDSDK_CONTAINER_CLUSTER=testnet"
- "CLOUDSDK_CORE_PROJECT=graph-mainnet"
# Restart the deployment
- name: 'gcr.io/cloud-builders/kubectl'
args:
- 'rollout'
- 'restart'
- 'deployment/graphix-cross-checker'

substitutions:
_GITHUB_REPO_OWNER: 'edgeandnode'
6 changes: 5 additions & 1 deletion crates/indexer_client/graphql/indexer/schema.gql
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,12 @@ type SubgraphIndexingStatus {
nonFatalErrors: [SubgraphError!]!
chains: [ChainIndexingStatus!]!
entityCount: BigInt!

"null if deployment is not assigned to an indexing node"
node: String
paused: Boolean!
"null if deployment is not assigned to an indexing node"
paused: Boolean

historyBlocks: Int!
}

Expand Down

0 comments on commit 5a8a4f5

Please sign in to comment.