Skip to content

Commit

Permalink
feat: DEVOPS-1247 move Scilla pipeline to GCP (#1247)
Browse files Browse the repository at this point in the history
  • Loading branch information
frankmeds authored Feb 7, 2024
1 parent 4768752 commit bcfc023
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/ci-image-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ jobs:
contents: write
name: build
runs-on: docker
env:
GCP_REGISTRY_DOMAIN: asia-docker.pkg.dev
GCP_REGISTRY: asia-docker.pkg.dev/${{ secrets.GCP_STG_REGISTRY_PROJECT_ID }}/zilliqa-private
steps:
- name: Clean environment
# Prune the Docker resources created over 10 days before the current execution (change the value for a more/less aggressive cleanup).
Expand All @@ -36,10 +39,9 @@ jobs:
with:
file: docker/Dockerfile
push: true
tag: ${{ secrets.AWS_ACCOUNT_ID_ZILLIQA }}.dkr.ecr.${{ secrets.AWS_REGION_ZILLIQA }}.amazonaws.com/scilla
tag: ${{ env.GCP_REGISTRY }}/scilla
tag-length: 8
registry: ${{ secrets.AWS_ACCOUNT_ID_ZILLIQA }}.dkr.ecr.${{ secrets.AWS_REGION_ZILLIQA }}.amazonaws.com
aws-region: ${{ secrets.AWS_REGION_ZILLIQA }}
role-to-assume: ${{ secrets.ECR_DEPLOYER_ROLE }}
oidc-role: ${{ secrets.OIDC_ROLE }}
registry: ${{ env.GCP_REGISTRY_DOMAIN }}
workload-identity-provider: "${{ secrets.GCP_PRD_GITHUB_WIF }}"
service-account: "${{ secrets.GCP_STG_GITHUB_SA_DOCKER_REGISTRY }}"
cache-key: ${{ github.event.repository.name }}
14 changes: 8 additions & 6 deletions .github/workflows/ci-image-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
id-token: write
contents: write
runs-on: docker
env:
GCP_REGISTRY_DOMAIN: asia-docker.pkg.dev
GCP_REGISTRY: asia-docker.pkg.dev/${{ secrets.GCP_PRD_REGISTRY_PROJECT_ID }}/zilliqa-private
steps:
- name: 'Checkout scm ${{ inputs.commitOrTag }}'
uses: actions/checkout@v3
Expand All @@ -42,17 +45,16 @@ jobs:
echo "latest=false" >> $GITHUB_OUTPUT
fi
shell: bash
- name: Docker build and push
- name: Docker build and push (GCP)
uses: Zilliqa/gh-actions-workflows/actions/ci-dockerized-app-build-push@v1
with:
file: docker/Dockerfile
push: true
tag: ${{ secrets.AWS_ACCOUNT_ID_ZILLIQA }}.dkr.ecr.${{ secrets.AWS_REGION_ZILLIQA }}.amazonaws.com/scilla:${{ steps.set-tag.outputs.tag }}
tag: ${{ env.GCP_REGISTRY }}/scilla:${{ steps.set-tag.outputs.tag }}
tag-latest: ${{ steps.check-latest.outputs.latest }}
registry: ${{ secrets.AWS_ACCOUNT_ID_ZILLIQA }}.dkr.ecr.${{ secrets.AWS_REGION_ZILLIQA }}.amazonaws.com
aws-region: ${{ secrets.AWS_REGION_ZILLIQA }}
role-to-assume: ${{ secrets.ECR_DEPLOYER_ROLE }}
oidc-role: ${{ secrets.OIDC_ROLE }}
registry: ${{ env.GCP_REGISTRY_DOMAIN }}
workload-identity-provider: "${{ secrets.GCP_PRD_GITHUB_WIF }}"
service-account: "${{ secrets.GCP_PRD_GITHUB_SA_DOCKER_REGISTRY }}"
cache-key: ${{ github.event.repository.name }}
- name: Docker build and push (Dockerhub)
uses: Zilliqa/gh-actions-workflows/actions/ci-dockerized-app-build-push@v1
Expand Down

0 comments on commit bcfc023

Please sign in to comment.