-
Notifications
You must be signed in to change notification settings - Fork 21
/
cloudbuild.yaml
61 lines (54 loc) · 1.56 KB
/
cloudbuild.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
steps:
- name: '${_REGISTRY}/$PROJECT_ID/helm'
args:
- package
- charts/$_CHART_NAME
id: 'helm package'
env:
- GCS_PLUGIN_VERSION=0.2.2
- HELMFILE_VERSION=v0.85.3
- HELM_REPO_NAME=$_HELM_REPO_NAME
- HELM_REPO_URL=$_HELM_REPO_URL
- name: '${_REGISTRY}/$PROJECT_ID/helm'
args:
- plugin
- install
- https://github.com/mbenabda/helm-local-chart-version
- --version
- v0.0.6
id: 'add version plugin'
- name: '${_REGISTRY}/$PROJECT_ID/helm'
entrypoint: 'bash'
args:
- -c
- helm local-chart-version get -c charts/$_CHART_NAME > $_ARTIFACT_FILENAME
id: 'save version to artifact'
- name: '${_REGISTRY}/$PROJECT_ID/helm'
entrypoint: 'bash'
args:
- -c
- helm gcs push ${_CHART_NAME}-$(cat $_ARTIFACT_FILENAME).tgz $_HELM_REPO_NAME
id: 'helm push'
# disable caching on repo index, https://github.com/helm/helm/issues/2453#issuecomment-301904742
- name: gcr.io/cloud-builders/gsutil
args:
- setmeta
- -h
- "Cache-Control:private, max-age=0, no-transform"
- ${_HELM_REPO_URL}/index.yaml
substitutions:
_REGISTRY: gcr.io
_ENV: dev
_CHART_NAME: blockchain-etl-streaming
_ARTIFACT_FILENAME: blockchain-etl-streaming-chart-version
_HELM_REPO_NAME: blockchain-k8s
_HELM_REPO_URL: gs://blockchain-k8s/charts
_ARTIFACT_URL: gs://artifacts-/versions/
options:
env:
- SKIP_CLUSTER_CONFIG=true
artifacts:
objects:
location: gs://artifacts-${PROJECT_ID}/versions/${_ENV}/
paths:
- $_ARTIFACT_FILENAME