-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (51 loc) · 2.04 KB
/
deploy-prod.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
name: deploy-prod
on:
push:
branches:
- main
# avoid possible race condition on multiple merges
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up GCP auth
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT }}
- name: Set up gcloud CLI
uses: google-github-actions/setup-gcloud@v2
- name: Set up gcloud plugins
run: gcloud components install gke-gcloud-auth-plugin
- name: Authorize kubectl CLI
run: gcloud container clusters get-credentials contrails-gke-general --region us-east1
- name: Authorize docker CLI
run: gcloud auth configure-docker us-east1-docker.pkg.dev
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push image
uses: docker/build-push-action@v5
with:
context: "."
push: true
tags: |
us-east1-docker.pkg.dev/contrails-301217/api-preprocessor/api-preprocessor-prod:${{ github.sha }}
us-east1-docker.pkg.dev/contrails-301217/api-preprocessor/api-preprocessor-prod:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Deploy helm resources
working-directory: helm/
run: make deploy
env:
NAMESPACE: api-preprocessor-prod
IMAGE: us-east1-docker.pkg.dev/contrails-301217/api-preprocessor/api-preprocessor-prod:${{ github.sha }}
SOURCE_PATH: gs://contrails-301217-ecmwf-hres-forecast-v2-short-term
SINK_PATH: gs://contrails-301217-api-preprocessor-prod
API_PREPROCESSOR_SUBSCRIPTION_ID: projects/contrails-301217/subscriptions/prod-mpl-api-preprocessor-sub
COCIP_REGIONS_BQ_TOPIC_ID: projects/contrails-301217/topics/prod-mpl-api-preprocessor-cocip-regions-bigquery
SUSPEND_CRONJOB: false