Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix cloudbuild to not use clone and deploy to cluster #103

Merged
merged 1 commit into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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