forked from ChainSafe/ChainBridge
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #105 from Cerebellum-Network/release/2.6.0
Release v2.6.0
- Loading branch information
Showing
14 changed files
with
102 additions
and
322 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,33 @@ | ||
# Copyright 2020 ChainSafe Systems | ||
# SPDX-License-Identifier: LGPL-3.0-only | ||
|
||
name: Release to prod | ||
on: | ||
push: | ||
branches: | ||
- master-cere | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: [self-hosted, cere-network-large-workers] | ||
outputs: | ||
version: ${{ steps.version.outputs.version }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Process version | ||
id: version | ||
run: | | ||
echo "::set-output name=version::prd-${{ github.run_attempt}}-$(git rev-parse --short HEAD)" | ||
- name: Configure AWS credentials for push images | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.ORG_AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.ORG_AWS_SECRET_ACCESS_KEY }} | ||
aws-region: ${{ secrets.AWS_REGION }} | ||
- name: Login to Amazon ECR | ||
id: login-ecr | ||
uses: aws-actions/amazon-ecr-login@v1 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Build and push docker image | ||
env: | ||
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} | ||
ECR_REPOSITORY: crb-${{ github.event.repository.name }} | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: ./ | ||
file: ./Dockerfile | ||
push: true | ||
no-cache: true | ||
build-args: | | ||
NPM_TOKEN=${{ secrets.NPM_TOKEN }} | ||
tags: ${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ steps.version.outputs.version }} | ||
uses: Cerebellum-Network/reusable-workflows/.github/workflows/build-and-push-docker.yaml@master | ||
with: | ||
runs-on: '["self-hosted", "cere-network-large-workers"]' | ||
org: cerebellumnetwork | ||
environment: prod | ||
image: crb-${{ github.event.repository.name }} | ||
repository: crb-${{ github.event.repository.name }} | ||
file: ./Dockerfile | ||
secrets: inherit | ||
|
||
deploy: | ||
runs-on: [self-hosted, cere-network-prd-deployer] | ||
uses: Cerebellum-Network/reusable-workflows/.github/workflows/deploy-with-helm.yaml@master | ||
needs: build | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
repository: ${{ secrets.K8S_DEPLOYMENT_CONFIGS_REPOSITORY }} | ||
token: ${{ secrets.TRIGGER_GITHUB_TOKEN }} | ||
- uses: azure/setup-helm@v1 | ||
with: | ||
version: ${{ secrets.HELM_VERSION }} | ||
- uses: azure/setup-kubectl@v1 | ||
with: | ||
version: ${{ secrets.KUBECTL_VERSION }} | ||
- name: Deploy | ||
env: | ||
HELM_RELEASE: network-relayer | ||
HELM_REPO_PATH: network/network-relayer | ||
NAMESPACE: network | ||
ENVIRONMENT: prod | ||
run: | | ||
helm upgrade --install ${HELM_RELEASE} ${HELM_REPO_PATH} \ | ||
-f ${HELM_REPO_PATH}/envs/${ENVIRONMENT}.yaml \ | ||
--set global.image.tag=${{ needs.build.outputs.version }} \ | ||
--debug --atomic --cleanup-on-fail \ | ||
--timeout 5m \ | ||
-n ${NAMESPACE} | ||
with: | ||
runs-on: '["self-hosted", "cere-network-prd-deployer"]' | ||
helm-repo-path: network/network-relayer | ||
helm-release: network-relayer | ||
namespace: network | ||
tag: ${{ needs.build.outputs.version }} | ||
environment: prod | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.