Skip to content

Commit

Permalink
[github-actions] disable deploy @stage
Browse files Browse the repository at this point in the history
  • Loading branch information
dennybaa committed Jun 24, 2021
1 parent 38e58ff commit 9e122eb
Showing 1 changed file with 66 additions and 67 deletions.
133 changes: 66 additions & 67 deletions .github/workflows/deploy-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,75 +53,74 @@ jobs:
docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }}
zk docker push rust
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]
# deploy:
# ## TODO: fix stage and enable deployments back.
# ## NOTE: breaking deployment is not supported.

container:
image: dysnix/kubectl:v1.19-gcloud
# name: Deploy to the Stage enviroment
# runs-on: [k8s, deployer, stage]
# needs: [pre, build-images]

env:
KUBECONF: ${{ secrets.KUBECONF_STAGE }}
IMAGE_TAG: ${{ needs.pre.outputs.shortRev }}
HFENV: stage
# container:
# image: dysnix/kubectl:v1.19-gcloud

steps:
-
name: Create ~/.kube/config
run: mkdir -p ~/.kube && echo "$KUBECONF" | base64 -d > ~/.kube/config
-
name: Clone helm-infra
uses: actions/checkout@v2
with:
repository: matter-labs/helm-infra
path: helm-infra
ref: master
token: ${{ secrets.GH_TOKEN }}
-
uses: chrnorm/deployment-action@releases/v1
name: Create GitHub deployment
id: deployment
with:
token: "${{ github.token }}"
environment: stage
-
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 ~
# env:
# KUBECONF: ${{ secrets.KUBECONF_STAGE }}
# IMAGE_TAG: ${{ needs.pre.outputs.shortRev }}
# HFENV: stage

# steps:
# -
# name: Create ~/.kube/config
# run: mkdir -p ~/.kube && echo "$KUBECONF" | base64 -d > ~/.kube/config
# -
# name: Clone helm-infra
# uses: actions/checkout@v2
# with:
# repository: matter-labs/helm-infra
# path: helm-infra
# ref: master
# token: ${{ secrets.GH_TOKEN }}
# -
# uses: chrnorm/deployment-action@releases/v1
# name: Create GitHub deployment
# id: deployment
# with:
# token: "${{ github.token }}"
# environment: stage
# -
# 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"
-
name: Update deployment status (success)
if: success()
uses: chrnorm/deployment-status@releases/v1
with:
token: ${{ github.token }}
state: success
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
-
name: Update deployment status (failure)
if: failure()
uses: chrnorm/deployment-status@releases/v1
with:
token: ${{ github.token }}
state: failure
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
-
name: Notify to Mattermost (on failure)
uses: tferreira/matterfy@releases/v1
if: failure()
with:
type: ${{ job.status }}
job_name: '*Deployment to stage failed*'
icon_emoji: octocat
channel: 'matterlabs-alerts'
url: ${{ secrets.MATTERMOST_WEBHOOK }}
# UPDATE_REPOS=y helmfile -e $HFENV repos
# helmfile -e $HFENV $DEPLOY_APPS apply --args "timeout 180s"
# -
# name: Update deployment status (success)
# if: success()
# uses: chrnorm/deployment-status@releases/v1
# with:
# token: ${{ github.token }}
# state: success
# deployment_id: ${{ steps.deployment.outputs.deployment_id }}
# -
# name: Update deployment status (failure)
# if: failure()
# uses: chrnorm/deployment-status@releases/v1
# with:
# token: ${{ github.token }}
# state: failure
# deployment_id: ${{ steps.deployment.outputs.deployment_id }}
# -
# name: Notify to Mattermost (on failure)
# uses: tferreira/matterfy@releases/v1
# if: failure()
# with:
# type: ${{ job.status }}
# job_name: '*Deployment to stage failed*'
# icon_emoji: octocat
# channel: 'matterlabs-alerts'
# url: ${{ secrets.MATTERMOST_WEBHOOK }}

0 comments on commit 9e122eb

Please sign in to comment.