Skip to content

Commit 8e4efaa

Browse files
authored
Merge pull request #784 from bcnmy/cicd/retire-container-registry
Cicd/retire container registry
2 parents ca454cb + 3852f07 commit 8e4efaa

5 files changed

Lines changed: 51 additions & 57 deletions

File tree

.github/workflows/pr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
with:
5252
image: ${{ matrix.image }}
5353
dockerfile: Dockerfile
54-
push: true
54+
push: false
5555
# GCP project where the identity provider is
5656
gcp_project_number: '334188102066'
5757
gcp_pool_id: 'github-pool'

.github/workflows/release.yaml

Lines changed: 45 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name: Version_Release
77
on:
88
push:
99
tags:
10-
- v0.**
10+
- v1.**
1111
jobs:
1212
js_build_test:
1313
runs-on: ubuntu-latest
@@ -47,25 +47,23 @@ jobs:
4747
strategy:
4848
matrix:
4949
image:
50-
- us-docker.pkg.dev/biconomy-prod/bundler/trustwallet
51-
- us-docker.pkg.dev/prj-biconomy-prod-001/bundler/bundler
50+
- us-west1-docker.pkg.dev/artifact-registry-1191/bundler/bundler
5251
# LOCATION-docker.pkg.dev/PROJECT-ID/REPOSITORY/IMAGE
5352
# {owner}/{repo}/.github/workflows/{filename}@{ref}
5453
uses: bcnmy/bundler/.github/workflows/container_img_build_push_gar.yaml@master
5554
with:
5655
image: ${{ matrix.image }}
57-
dockerfile: Dockerfile.helm
56+
dockerfile: Dockerfile
57+
push: true
5858
# GCP project where the identity provider is
59-
# gcloud projects describe prj-workload-identity-001
60-
gcp_project_number: '766873424314'
61-
gcp_pool_id: 'pool-id-github-actions'
62-
# gcp_provider_id: 'ga-GITHUB_REPO_NAME'
63-
gcp_provider_id: 'ga-bundler'
59+
gcp_project_number: '334188102066'
60+
gcp_pool_id: 'github-pool'
61+
gcp_provider_id: 'github-actions-wif-provider'
6462
# LOCATION-docker.pkg.dev/PROJECT-ID/REPOSITORY/IMAGE
65-
gcp_registry: 'us-docker.pkg.dev/biconomy-prod/bundler/trustwallet'
66-
gcp_service_account: 'sa-bundler@prj-workload-identity-001.iam.gserviceaccount.com'
63+
gcp_registry: 'us-west1-docker.pkg.dev/artifact-registry-1191/bundler/bundler'
64+
gcp_service_account: 'sa-bundler@workload-identity-e697.iam.gserviceaccount.com'
6765

68-
deploy_tw_staging:
66+
deploy_staging:
6967
needs: [container_img_build_push_gar]
7068
# Allow the job to fetch a GitHub ID token
7169
# runs-on: ubuntu-latest
@@ -76,48 +74,41 @@ jobs:
7674
with:
7775
# GCP project where the identity provider is
7876
# gcloud projects describe prj-workload-identity-001
79-
gcp_project_number: '766873424314'
80-
gcp_project_id: 'biconomy-prod'
81-
gcp_bastion: 'bastion02'
82-
gcp_bastion_zone: 'us-east1-b'
83-
gcp_pool_id: 'pool-id-github-actions'
84-
# gcp_provider_id: 'ga-GITHUB_REPO_NAME'
85-
gcp_provider_id: 'ga-bundler'
77+
gcp_project_number: '334188102066'
78+
gcp_project_id: 'biconomy-staging'
79+
gcp_bastion: ''
80+
gcp_bastion_zone: ''
81+
gcp_pool_id: 'github-pool'
82+
gcp_provider_id: 'github-actions-wif-provider'
8683
# SERVICE_ACCOUNT_EMAIL="${SERVICE_ACCOUNT}@${PROJECT}.iam.gserviceaccount.com"
87-
gcp_service_account: 'sa-bundler@prj-workload-identity-001.iam.gserviceaccount.com'
88-
gcp_cluster_name: 'dedicated-bundler'
89-
gcp_cluster_location: 'us-east1'
90-
use_internal_ip: true
91-
# https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables
92-
# deploy_command: 'helm ls --all-namespaces'
84+
gcp_service_account: 'sa-bundler@workload-identity-e697.iam.gserviceaccount.com'
85+
gcp_cluster_name: 'biconomy-staging'
86+
gcp_cluster_location: 'us-east1-b'
87+
use_internal_ip: false
9388
# deploy_command: 'echo IMG_VERSION is ${GITHUB_REF:10}' # for example extracts v0.0.5 from "refs/tags/v0.0.5"
94-
deploy_command: './install-bundler/bundler-update-release.sh bundler-tw-staging.cfg ${GITHUB_REF:10}'
89+
deploy_command: './k8s/deploy.sh 1 staging staging-sdk-relayer sdk-staging ${GITHUB_REF:10}'
90+
9591

96-
deploy_tw_prod:
97-
needs: [deploy_tw_staging]
98-
# environment: tw-prod
99-
# Allow the job to fetch a GitHub ID token
100-
# runs-on: ubuntu-latest
101-
permissions:
102-
id-token: write
103-
contents: read
104-
uses: bcnmy/bundler/.github/workflows/deploy_to_gke.yaml@master
105-
with:
106-
environment: 'tw-prod'
107-
# GCP project where the identity provider is
108-
# gcloud projects describe prj-workload-identity-001
109-
gcp_project_number: '766873424314'
110-
# GCP project ID where the workload will be deployed
111-
gcp_project_id: 'prj-biconomy-prod-001'
112-
gcp_bastion: 'bastion02'
113-
gcp_bastion_zone: 'us-central1-a'
114-
gcp_pool_id: 'pool-id-github-actions'
115-
# gcp_provider_id: 'ga-GITHUB_REPO_NAME'
116-
gcp_provider_id: 'ga-bundler'
117-
# SERVICE_ACCOUNT_EMAIL="${SERVICE_ACCOUNT}@${PROJECT}.iam.gserviceaccount.com"
118-
gcp_service_account: 'sa-bundler@prj-workload-identity-001.iam.gserviceaccount.com'
119-
gcp_cluster_name: 'trustwallet'
120-
gcp_cluster_location: 'us-central1'
121-
use_internal_ip: true
122-
deploy_command: './install-bundler/bundler-update-release.sh bundler-tw-production.cfg ${GITHUB_REF:10}'
123-
# deploy_command: 'helm ls --all-namespaces'
92+
# deploy_prod:
93+
# needs: [deploy_staging]
94+
# # Allow the job to fetch a GitHub ID token
95+
# # runs-on: ubuntu-latest
96+
# permissions:
97+
# id-token: write
98+
# contents: read
99+
# uses: bcnmy/bundler/.github/workflows/deploy_to_gke.yaml@master
100+
# with:
101+
# environment: 'prod'
102+
# # GCP project where the identity provider is
103+
# gcp_project_number: '334188102066'
104+
# gcp_project_id: 'biconomy-prod'
105+
# gcp_bastion: ''
106+
# gcp_bastion_zone: ''
107+
# gcp_pool_id: 'github-pool'
108+
# gcp_provider_id: 'github-actions-wif-provider'
109+
# # SERVICE_ACCOUNT_EMAIL="${SERVICE_ACCOUNT}@${PROJECT}.iam.gserviceaccount.com"
110+
# gcp_service_account: 'sa-bundler@workload-identity-e697.iam.gserviceaccount.com'
111+
# gcp_cluster_name: 'biconomy-prod'
112+
# gcp_cluster_location: 'us-east1'
113+
# use_internal_ip: false
114+
# deploy_command: './k8s/deploy.sh 2 prod prod-sdk-relayer sdk-prod ${GITHUB_REF:10}'

k8s/deploy.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ REPLICAS=$1
1616
ENV=$2
1717
NAME=$3
1818
NAMESPACE=$4
19+
IMAGE_TAG=$5
1920
PODS_NAME="relayer-server"
2021

2122
echo "Number of replicas: $REPLICAS"
@@ -70,6 +71,7 @@ helm upgrade "${HELM_NAME}" ./k8s/common/ \
7071
--timeout 720s \
7172
--values ./k8s/common/values."${ENV}".yaml \
7273
--set-string namespace="${NAMESPACE}" \
74+
--set image_tag="${IMAGE_TAG}" \
7375
--namespace "${NAMESPACE}"
7476

7577
echo "Deployed $HELM_NAME to $NAMESPACE"
@@ -86,6 +88,7 @@ while [ "${x}" -lt "${REPLICAS}" ]; do
8688
--values ./k8s/relayer/values."${ENV}".yaml \
8789
--set-string namespace="${NAMESPACE}" \
8890
--set index="${x}" \
91+
--set image_tag="${IMAGE_TAG}" \
8992
--namespace "${NAMESPACE}"
9093

9194
echo "Deployed ${HELM_NAME}to ${NAMESPACE}";

k8s/relayer/values.prod.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ index: 0
66
relayer:
77
environment: "production"
88
name: "relayer-server"
9-
image: "gcr.io/biconomy-prod/sdk/relayer-node-service:latest"
9+
image: "us-west1-docker.pkg.dev/artifact-registry-1191/bundler/bundler:latest"
1010
port: "3000"
1111
replicaCount: 1
1212
resource:

k8s/relayer/values.staging.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ index: 0
44
relayer:
55
environment: "staging"
66
name: "relayer-server"
7-
image: "gcr.io/biconomy-staging/sdk/relayer-node-service:latest"
7+
image: "us-west1-docker.pkg.dev/artifact-registry-1191/bundler/bundler:latest"
88
port: "3000"
99
replicaCount: 1
1010
# Increase also the value for NODE_OPTIONS --max_old_space_size

0 commit comments

Comments
 (0)