-
Notifications
You must be signed in to change notification settings - Fork 1
112 lines (105 loc) · 3.49 KB
/
helm-gke-deploy.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: Helm GKE Deploy
# Reusable workflow for deploying a Helm chart on GKE Kubernetes
on:
workflow_call:
inputs:
release-name:
description: "Helm release name"
required: true
type: string
namespace:
description: "K8s namespace to deploy in"
required: true
type: string
chart:
description: "Helm chart to deploy"
required: true
type: string
values-yaml:
description: "File path as string for a single Helm value file or as json array for multiple Helm value files"
required: true
type: string
repository-name:
description: "Helm repository name"
required: false
type: string
repository-url:
description: "Url of the repository"
required: false
type: string
chart-version:
description: "Chart version"
required: false
type: string
post-renderer:
description: "File path as string for a Helm post renderer"
required: false
type: string
timeout:
description: "Timeout for the Helm command in seconds"
default: "1200"
required: false
type: string
gcloud-sdk-version:
description: "GCloud SDK version"
default: "376.0.0"
required: false
type: string
kubectl-version:
description: "Kubectl version"
default: "v1.23.0"
required: false
type: string
helm-version:
description: "Helm version"
default: "v3.8.1"
required: false
type: string
secrets:
gke-service-account:
description: "GKE service account key for authentication"
required: true
gke-project:
description: "GKE project id for authentication"
required: true
gke-region:
description: "GKE region for authentication"
required: true
gke-cluster:
description: "GKE cluster for authentication"
required: true
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-helm-gke-deploy
cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }}
jobs:
deploy:
name: Deploy
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: bakdata/ci-templates/actions/[email protected]
- name: Setup credentials
uses: bakdata/ci-templates/actions/[email protected]
with:
gke-service-account: ${{ secrets.gke-service-account }}
gke-project: ${{ secrets.gke-project }}
gke-region: ${{ secrets.gke-region }}
gke-cluster: ${{ secrets.gke-cluster }}
gcloud-sdk-version: ${{ inputs.gcloud-sdk-version }}
- name: Setup environment
uses: bakdata/ci-templates/actions/[email protected]
with:
kubectl-version: ${{ inputs.kubectl-version }}
helm-version: ${{ inputs.helm-version }}
- name: Deploy Helm chart
uses: bakdata/ci-templates/actions/[email protected]
with:
release-name: ${{ inputs.release-name }}
namespace: ${{ inputs.namespace }}
chart: ${{ inputs.chart }}
values-yaml: ${{ inputs.values-yaml }}
chart-version: ${{ inputs.chart-version }}
post-renderer: ${{ inputs.post-renderer }}
timeout: ${{ inputs.timeout }}
repository-name: ${{ inputs.repository-name }}
repository-url: ${{ inputs.repository-url }}