Skip to content

Commit

Permalink
ci: remove session key injection (#340)
Browse files Browse the repository at this point in the history
  • Loading branch information
irmannmal authored Aug 8, 2022
1 parent e688d18 commit ae51556
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 142 deletions.
107 changes: 0 additions & 107 deletions .github/workflows/benchmark.yml

This file was deleted.

9 changes: 9 additions & 0 deletions .github/workflows/builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ jobs:
- name: Copy binnary file
run: cp target/release/debio .
- name: Build and push
if: "!startsWith(github.ref, 'refs/tags/')"
uses: docker/build-push-action@v2
with:
context: .
Expand All @@ -104,6 +105,14 @@ jobs:
${{ github.repository }}:${{ needs.compute-build-info.outputs.latest_tag }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: Docker image re-tag
if: "startsWith(github.ref, 'refs/tags/')"
uses: akhilerm/[email protected]
with:
src: ${{ github.repository }}:${{ needs.compute-build-info.outputs.sha_short }}
dst: |
${{ github.repository }}:${{ needs.compute-build-info.outputs.revision_tag }}
${{ github.repository }}:${{ needs.compute-build-info.outputs.latest_tag }}
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
Expand Down
33 changes: 0 additions & 33 deletions .github/workflows/deployer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,6 @@ jobs:
NODE_KEY_PUBLIC_VALIDATOR_1:${{ secrets.DEV_GCP_PROJECT_ID }}/NODE_KEY_PUBLIC_VALIDATOR_1
NODE_KEY_PRIVATE_VALIDATOR_2:${{ secrets.DEV_GCP_PROJECT_ID }}/NODE_KEY_PRIVATE_VALIDATOR_2
NODE_KEY_PUBLIC_VALIDATOR_2:${{ secrets.DEV_GCP_PROJECT_ID }}/NODE_KEY_PUBLIC_VALIDATOR_2
SESSION_KEY_SEED_VALIDATOR_1:${{ secrets.DEV_GCP_PROJECT_ID }}/SESSION_KEY_SEED_VALIDATOR_1
SESSION_KEY_GRANDPA_VALIDATOR_1:${{ secrets.DEV_GCP_PROJECT_ID }}/SESSION_KEY_GRANDPA_VALIDATOR_1
SESSION_KEY_BABE_VALIDATOR_1:${{ secrets.DEV_GCP_PROJECT_ID }}/SESSION_KEY_BABE_VALIDATOR_1
SESSION_KEY_IMONLINE_VALIDATOR_1:${{ secrets.DEV_GCP_PROJECT_ID }}/SESSION_KEY_IMONLINE_VALIDATOR_1
SESSION_KEY_BEEFY_VALIDATOR_1:${{ secrets.DEV_GCP_PROJECT_ID }}/SESSION_KEY_BEEFY_VALIDATOR_1
SESSION_KEY_SEED_VALIDATOR_2:${{ secrets.DEV_GCP_PROJECT_ID }}/SESSION_KEY_SEED_VALIDATOR_2
SESSION_KEY_GRANDPA_VALIDATOR_2:${{ secrets.DEV_GCP_PROJECT_ID }}/SESSION_KEY_GRANDPA_VALIDATOR_2
SESSION_KEY_BABE_VALIDATOR_2:${{ secrets.DEV_GCP_PROJECT_ID }}/SESSION_KEY_BABE_VALIDATOR_2
SESSION_KEY_IMONLINE_VALIDATOR_2:${{ secrets.DEV_GCP_PROJECT_ID }}/SESSION_KEY_IMONLINE_VALIDATOR_2
SESSION_KEY_BEEFY_VALIDATOR_2:${{ secrets.DEV_GCP_PROJECT_ID }}/SESSION_KEY_BEEFY_VALIDATOR_2
- name: Deploy
if: "${{ env.DEPLOY == 'true' }}"
uses: appleboy/ssh-action@master
Expand All @@ -114,49 +104,26 @@ jobs:
--set config.nodes[0].validator=false \
--set-string config.nodes[0].keys.private=${{ steps.secrets.outputs.NODE_KEY_PRIVATE_1 }} \
--set-string config.nodes[0].keys.public=${{ steps.secrets.outputs.NODE_KEY_PUBLIC_1 }} \
--set config.nodes[0].sessionInjectionEnabled=false \
--set-string config.nodes[1].name=archive1 \
--set config.nodes[1].bootnode=true \
--set config.nodes[1].archive=true \
--set config.nodes[1].validator=false \
--set-string config.nodes[1].keys.private=${{ steps.secrets.outputs.NODE_KEY_PRIVATE_2 }} \
--set-string config.nodes[1].keys.public=${{ steps.secrets.outputs.NODE_KEY_PUBLIC_2 }} \
--set config.nodes[1].sessionInjectionEnabled=false \
--set-string config.nodes[2].name=validator1 \
--set config.nodes[2].bootnode=true \
--set config.nodes[2].archive=false \
--set config.nodes[2].validator=true \
--set-string config.nodes[2].keys.private=${{ steps.secrets.outputs.NODE_KEY_PRIVATE_VALIDATOR_1 }} \
--set-string config.nodes[2].keys.public=${{ steps.secrets.outputs.NODE_KEY_PUBLIC_VALIDATOR_1 }} \
--set config.nodes[2].sessionInjectionEnabled=true \
--set-string config.nodes[2].sessionKeys.keySeed="${{ steps.secrets.outputs.SESSION_KEY_SEED_VALIDATOR_1 }}" \
--set-string config.nodes[2].sessionKeys.grandpa=${{ steps.secrets.outputs.SESSION_KEY_GRANDPA_VALIDATOR_1 }} \
--set-string config.nodes[2].sessionKeys.babe=${{ steps.secrets.outputs.SESSION_KEY_BABE_VALIDATOR_1 }} \
--set-string config.nodes[2].sessionKeys.imonline=${{ steps.secrets.outputs.SESSION_KEY_IMONLINE_VALIDATOR_1 }} \
--set-string config.nodes[2].sessionKeys.beefy=${{ steps.secrets.outputs.SESSION_KEY_BEEFY_VALIDATOR_1 }} \
--set-string config.nodes[3].name=validator2 \
--set config.nodes[3].bootnode=true \
--set config.nodes[3].archive=false \
--set config.nodes[3].validator=true \
--set-string config.nodes[3].keys.private=${{ steps.secrets.outputs.NODE_KEY_PRIVATE_VALIDATOR_2 }} \
--set-string config.nodes[3].keys.public=${{ steps.secrets.outputs.NODE_KEY_PUBLIC_VALIDATOR_2 }} \
--set config.nodes[3].sessionInjectionEnabled=true \
--set-string config.nodes[3].sessionKeys.keySeed="${{ steps.secrets.outputs.SESSION_KEY_SEED_VALIDATOR_2 }}" \
--set-string config.nodes[3].sessionKeys.grandpa=${{ steps.secrets.outputs.SESSION_KEY_GRANDPA_VALIDATOR_2 }} \
--set-string config.nodes[3].sessionKeys.babe=${{ steps.secrets.outputs.SESSION_KEY_BABE_VALIDATOR_2 }} \
--set-string config.nodes[3].sessionKeys.imonline=${{ steps.secrets.outputs.SESSION_KEY_IMONLINE_VALIDATOR_2 }} \
--set-string config.nodes[3].sessionKeys.beefy=${{ steps.secrets.outputs.SESSION_KEY_BEEFY_VALIDATOR_2 }} \
--set services.httpRPC.enabled=true \
--set services.websocketRPC.enabled=true \
--set ingress.httpRPC.enabled=true \
--set-string ingress.httpRPC.annotations."kubernetes\.io/ingress\.class"=nginx \
--set-string ingress.httpRPC.annotations."cert-manager\.io/cluster-issuer"=letsencrypt \
--set-string ingress.httpRPC.annotations."nginx\.ingress\.kubernetes\.io/limit-rps"="10" \
--set-string ingress.httpRPC.hosts[0].host=http-rpc.dev.debio.network \
--set-string ingress.httpRPC.hosts[0].paths[0].path=/ \
--set-string ingress.httpRPC.hosts[0].paths[0].pathType=ImplementationSpecific \
--set-string ingress.httpRPC.tls[0].secretName=debio-node-http-rpc-tls \
--set-string ingress.httpRPC.tls[0].hosts[0]=http-rpc.dev.debio.network \
--set ingress.websocketRPC.enabled=true \
--set-string ingress.websocketRPC.annotations."kubernetes\.io/ingress\.class"=nginx \
--set-string ingress.websocketRPC.annotations."cert-manager\.io/cluster-issuer"=letsencrypt \
Expand Down
28 changes: 26 additions & 2 deletions .github/workflows/tester.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,30 @@ concurrency:
cancel-in-progress: true

jobs:
changes:
runs-on: ubuntu-latest
outputs:
test: ${{ steps.filter.outputs.test }}
markdown: ${{ steps.filter.outputs.markdown }}
steps:
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
test-code:
- 'node/**'
- 'pallets/**'
- 'primitives/**'
- 'runtime/**'
- 'trait/**'
- '.editorconfig'
- 'rustfmt.toml'
- 'Cargo.toml'
- 'Cargo.lock'
test-code:
needs: changes
if: ${{ needs.changes.outputs.test-code == 'true' }}
runs-on: ubuntu-20.04
steps:
- name: Checkout code
Expand All @@ -34,6 +57,7 @@ jobs:
run: ./.maintain/test.sh

check-link-markdown:
needs: changes
runs-on: ubuntu-20.04
steps:
- name: Checkout code
Expand All @@ -43,5 +67,5 @@ jobs:
- name: Check link markdown
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'yes'
config-file: '.github/workflows/mlc_config.json'
use-quiet-mode: "yes"
config-file: ".github/workflows/mlc_config.json"

0 comments on commit ae51556

Please sign in to comment.