From 291a07c92a474581ffa45e9115e4a39fb0d04797 Mon Sep 17 00:00:00 2001 From: DaMandal0rian Date: Fri, 19 Jul 2024 02:06:08 +0300 Subject: [PATCH 1/4] add Graphix cloudbuild workflow --- cloudbuild.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 cloudbuild.yaml diff --git a/cloudbuild.yaml b/cloudbuild.yaml new file mode 100644 index 0000000..3bf6a58 --- /dev/null +++ b/cloudbuild.yaml @@ -0,0 +1,27 @@ +options: + machineType: "N1_HIGHCPU_32" +timeout: 1800s + +steps: + - 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" + args: + - 'set' + - 'image' + - 'deployment/graphix' + - 'graphix=ghcr.io/edgeandnode/graphix:latest' + - '--record' + - 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" + args: + - 'rollout' + - 'restart' + - 'deployment/graphix' From 2488b59b6bf4acfbf384dd6a3b31de99f79af068 Mon Sep 17 00:00:00 2001 From: DaMandal0rian Date: Fri, 19 Jul 2024 02:15:59 +0300 Subject: [PATCH 2/4] add remote repo to apply kubectl --- cloudbuild.yaml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 3bf6a58..dc415a8 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -3,6 +3,14 @@ options: timeout: 1800s steps: + - id: 'Checkout Kustomize Configuration' + name: 'gcr.io/cloud-builders/git' + env: + - 'GIT_AUTH_TOKEN=$_GITHUB_PAT' + args: + - 'clone' + - 'https://github.com/edgeandnode/graph-infra.git' + - id: 'Update Graphix Deployment' name: 'gcr.io/cloud-builders/kubectl' env: @@ -10,11 +18,10 @@ steps: - "CLOUDSDK_CONTAINER_CLUSTER=testnet" - "CLOUDSDK_CORE_PROJECT=graph-mainnet" args: - - 'set' - - 'image' - - 'deployment/graphix' - - 'graphix=ghcr.io/edgeandnode/graphix:latest' - - '--record' + - 'apply' + - '-k' + - 'graph-infra/graph-mainnet/testnet/k8s/graphix/environments/' + - id: 'Restart Graphix Deployment' name: 'gcr.io/cloud-builders/kubectl' env: @@ -24,4 +31,7 @@ steps: args: - 'rollout' - 'restart' - - 'deployment/graphix' + - 'deployment/graphix-cross-checker' + +substitutions: + _GITHUB_PAT: ${_GITHUB_PAT} From 17caf444ab2e256b5b56642fcd10c2043c802a28 Mon Sep 17 00:00:00 2001 From: DaMandal0rian Date: Fri, 19 Jul 2024 17:05:29 +0300 Subject: [PATCH 3/4] change PAT token name --- cloudbuild.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudbuild.yaml b/cloudbuild.yaml index dc415a8..8f8b2fb 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -6,7 +6,7 @@ steps: - id: 'Checkout Kustomize Configuration' name: 'gcr.io/cloud-builders/git' env: - - 'GIT_AUTH_TOKEN=$_GITHUB_PAT' + - 'GIT_AUTH_TOKEN=$_GITHUB_GRAPHIX_INFRA_PAT' args: - 'clone' - 'https://github.com/edgeandnode/graph-infra.git' From 9e68ca879196476b6b9b4bcc56af86726e42c807 Mon Sep 17 00:00:00 2001 From: DaMandal0rian Date: Sat, 20 Jul 2024 03:17:35 +0300 Subject: [PATCH 4/4] fix PAT token name --- cloudbuild.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 8f8b2fb..d84d7cf 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -34,4 +34,4 @@ steps: - 'deployment/graphix-cross-checker' substitutions: - _GITHUB_PAT: ${_GITHUB_PAT} + _GITHUB_GRAPHIX_INFRA_PAT: ${_GITHUB_GRAPHIX_INFRA_PAT}