Skip to content

Commit

Permalink
update deployment workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
dennybaa committed Jun 24, 2021
1 parent 8ab2150 commit 38e58ff
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/deploy-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,22 @@ jobs:
{
"mainnet": {
"KUBECONF": "KUBECONF_MAINNET",
"HFENV": "zksync-prod",
"HFENV": "prod",
"RUNNER": "mainnet"
},
"rinkeby": {
"KUBECONF": "KUBECONF_TESTNET",
"HFENV": "zksync-${{ github.event.deployment.environment }}",
"HFENV": "${{ github.event.deployment.environment }}",
"RUNNER": "testnet"
},
"ropsten": {
"KUBECONF": "KUBECONF_TESTNET",
"HFENV": "zksync-${{ github.event.deployment.environment }}",
"HFENV": "${{ github.event.deployment.environment }}",
"RUNNER": "testnet"
},
".*": {
"KUBECONF": "KUBECONF_STAGE",
"HFENV": "zksync-${{ github.event.deployment.environment }}",
"HFENV": "${{ github.event.deployment.environment }}",
"RUNNER": "stage"
}
}
Expand All @@ -71,7 +71,7 @@ jobs:
if: ${{ needs.pre.outputs.isTag == 'true' }}

container:
image: dysnix/kubectl:v1.16-gcloud
image: dysnix/kubectl:v1.19-gcloud

env:
IMAGE_TAG: ${{ needs.pre.outputs.shortRev }}
Expand Down
28 changes: 16 additions & 12 deletions .github/workflows/deploy-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- dev
- breaking

env:
DEPLOY_APPS: -l name=server -l name=prover -l name=explorer
Expand Down Expand Up @@ -51,20 +52,24 @@ jobs:
run: |
docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }}
zk docker push rust
zk docker push nginx
deploy:
# TODO: fix stage and enable deployments back.
# NOTE: breaking deployment is not supported.
# if: ${{ github.ref == 'refs/heads/dev' }}
if: ${{ false }}

name: Deploy to the Stage enviroment
runs-on: [k8s, deployer, stage]
needs: [pre, build-images]

container:
image: dysnix/kubectl:v1.16-gcloud
image: dysnix/kubectl:v1.19-gcloud

env:
KUBECONF: ${{ secrets.KUBECONF_STAGE }}
IMAGE_TAG: ${{ needs.pre.outputs.shortRev }}
HFENV: zksync-stage
HFENV: stage

steps:
-
Expand All @@ -85,16 +90,15 @@ jobs:
with:
token: "${{ github.token }}"
environment: stage
# TODO fix stage and resume deploy to stage
# -
# name: Deploy apps
# working-directory: helm-infra
# run: |
-
name: Deploy apps
working-directory: helm-infra
run: |
# copy helm plugins over (from dysnix/kubectl, don't forget)!!!
# cp -r /dysnix/kubectl/.local /dysnix/kubectl/.cache ~
#
# UPDATE_REPOS=y helmfile -e $HFENV repos
# helmfile -e $HFENV $DEPLOY_APPS apply --args "timeout 180s"
cp -r /dysnix/kubectl/.local /dysnix/kubectl/.cache ~
UPDATE_REPOS=y helmfile -e $HFENV repos
helmfile -e $HFENV $DEPLOY_APPS apply --args "timeout 180s"
-
name: Update deployment status (success)
if: success()
Expand Down

0 comments on commit 38e58ff

Please sign in to comment.