-
Notifications
You must be signed in to change notification settings - Fork 9
74 lines (67 loc) · 2.09 KB
/
cd-dev.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Deploy to Development
concurrency:
group: dev-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
inputs:
ttl:
description: "Deployment time to live in hours"
required: true
type: number
default: 24
jobs:
compute-sha:
name: Compute sha_short
runs-on: ubuntu-latest
outputs:
sha_short: ${{ steps.vars.outputs.sha_short }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set vars
id: vars
run: |
echo "sha_short=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_OUTPUT
build-push:
name: Build and Push Images and Charts
needs: [compute-sha]
uses: ./.github/workflows/cd.yaml
with:
image_tag: ${{ needs.compute-sha.outputs.sha_short }}
chart_ver: 0.1.0-dev.${{ needs.compute-sha.outputs.sha_short }}
secrets: inherit
deploy:
name: SSH and Deploy
needs: [compute-sha, build-push]
uses: ./.github/workflows/deploy.yaml
with:
environment: development
name: bt-dev-app-${{ needs.compute-sha.outputs.sha_short }}
version: 0.1.0-dev.${{ needs.compute-sha.outputs.sha_short }}
values: |
env: dev
ttl: ${{ inputs.ttl }}
frontend:
image:
tag: "${{ needs.compute-sha.outputs.sha_short }}"
backend:
image:
tag: "${{ needs.compute-sha.outputs.sha_short }}"
datapuller:
courses:
image:
tag: "${{ needs.compute-sha.outputs.sha_short }}"
sections:
image:
tag: "${{ needs.compute-sha.outputs.sha_short }}"
classes:
image:
tag: "${{ needs.compute-sha.outputs.sha_short }}"
cleanup:
image:
tag: "${{ needs.compute-sha.outputs.sha_short }}"
host: ${{ needs.compute-sha.outputs.sha_short }}.dev.stanfurdtime.com
mongoUri: mongodb://bt-dev-mongo-mongodb.bt.svc.cluster.local:27017/bt
redisUri: redis://bt-dev-redis-master.bt.svc.cluster.local:6379
secrets: inherit