Skip to content

Commit

Permalink
New alerting service (#1985)
Browse files Browse the repository at this point in the history
  • Loading branch information
PopDaph authored Oct 6, 2023
1 parent 5e5e44d commit b6a590f
Show file tree
Hide file tree
Showing 9 changed files with 903 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/deploy-alerting-temporal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Deploy Alerting Temporal

on:
workflow_dispatch:

concurrency:
group: deploy_alerting_temporal
cancel-in-progress: false

env:
GCLOUD_PROJECT_ID: ${{ secrets.GCLOUD_PROJECT_ID }}

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Get short sha
id: short_sha
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: "Authenticate with Google Cloud"
uses: "google-github-actions/auth@v1"
with:
credentials_json: "${{ secrets.GCLOUD_SA_KEY }}"

- name: "Set up Cloud SDK"
uses: "google-github-actions/setup-gcloud@v1"

- name: Install gke-gcloud-auth-plugin
run: |
gcloud components install gke-gcloud-auth-plugin
- name: Setup kubectl
run: |
gcloud container clusters get-credentials dust-kube --region us-central1
- name: Build the image on Cloud Build
run: |
chmod +x ./k8s/cloud-build.sh
./k8s/cloud-build.sh alerting/temporal
- name: Deploy the image on Kubernetes
run: |
chmod +x ./k8s/deploy-image.sh
./k8s/deploy-image.sh gcr.io/$GCLOUD_PROJECT_ID/alerting-deployment-image:${{ steps.short_sha.outputs.short_sha }} alerting-temporal-deployment
- name: Wait for rollout to complete
run: kubectl rollout status deployment/alerting-temporal-deployment --timeout=10m
8 changes: 8 additions & 0 deletions alerting/temporal/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# dependencies
/node_modules

# misc
.DS_Store
*.pem


7 changes: 7 additions & 0 deletions alerting/temporal/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# syntax=docker/dockerfile:1

FROM node:18-alpine
WORKDIR /src
COPY . .
RUN npm install
CMD ["npm", "run", "start"]
Loading

0 comments on commit b6a590f

Please sign in to comment.