Skip to content

Commit

Permalink
Deploy staging with an Action (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
zwolf authored Mar 16, 2022
1 parent 8cf1dd8 commit 923601a
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 8 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/deploy_staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Deploy to Staging

on:
push:
branches:
- master
workflow_dispatch:

jobs:
build_and_push_image:
name: Build and Push Image
uses: zooniverse/ci-cd/.github/workflows/build_and_push_image.yaml@main
with:
repo_name: designator
commit_id: ${{ github.sha }}
latest: true

deploy_staging:
name: Deploy to Staging
uses: zooniverse/ci-cd/.github/workflows/deploy_app.yaml@main
needs: build_and_push_image
with:
app_name: designator
repo_name: designator
commit_id: ${{ github.sha }}
environment: staging
secrets:
creds: ${{ secrets.AZURE_AKS }}

deploy_slack_notification:
name: Slack notification
uses: zooniverse/ci-cd/.github/workflows/slack_notification.yaml@main
needs: deploy_staging
if: always()
with:
commit_id: ${{ github.sha }}
job_name: Deploy to Staging / deploy_app
status: ${{ needs.deploy_staging.result }}
title: "Designator Staging migration & deploy complete"
title_link: "https://designator-staging.zooniverse.org/"
secrets:
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}
8 changes: 0 additions & 8 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,6 @@ pipeline {
sh "sed 's/__IMAGE_TAG__/${GIT_COMMIT}/g' kubernetes/deployment-production.tmpl | kubectl --context azure apply --record -f -"
}
}

stage('Deploy staging to Kubernetes') {
when { branch 'master' }
agent any
steps {
sh "sed 's/__IMAGE_TAG__/${GIT_COMMIT}/g' kubernetes/deployment-staging.tmpl | kubectl --context azure apply --record -f -"
}
}
}

post {
Expand Down

0 comments on commit 923601a

Please sign in to comment.