-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwerf.yaml
More file actions
121 lines (115 loc) · 2.77 KB
/
werf.yaml
File metadata and controls
121 lines (115 loc) · 2.77 KB
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
113
114
115
116
117
118
119
120
121
project: operator-helm
configVersion: 1
build:
imageSpec:
author: "Deckhouse Kubernetes Platform <contact@deckhouse.io>"
clearHistory: true
config:
keepEssentialWerfLabels: true
removeLabels:
- /.*/
---
# Base Images
{{- include "parse_base_images_map" . }}
---
# Source repo settings
{{- $_ := set . "SOURCE_REPO" (env "SOURCE_REPO" "https://github.com") }}
{{- $_ := set . "SOURCE_REPO_GIT" (env "SOURCE_REPO_GIT" "https://github.com") }}
# Define packages proxy settings
{{- $_ := set . "DistroPackagesProxy" (env "DISTRO_PACKAGES_PROXY" "") }}
# svace analyze toggler
{{- $_ := set . "SVACE_ENABLED" (env "SVACE_ENABLED" "false") }}
{{- $_ := set . "SVACE_ANALYZE_HOST" (env "SVACE_ANALYZE_HOST" "example.host") }}
{{- $_ := set . "SVACE_ANALYZE_SSH_USER" (env "SVACE_ANALYZE_SSH_USER" "user") }}
{{- $_ := set . "ImagesIDList" list }}
{{- range $path, $content := .Files.Glob ".werf/*.yaml" }}
{{- tpl $content $ }}
{{- end }}
---
image: images-digests
fromImage: builder/alpine
dependencies:
{{- range $ImageID := $.ImagesIDList }}
{{- $ImageNameCamel := $ImageID | splitList "/" | last | camelcase | untitle }}
- image: {{ $ImageID }}
before: setup
imports:
- type: ImageDigest
targetEnv: MODULE_IMAGE_DIGEST_{{ $ImageNameCamel }}
{{- end }}
shell:
beforeInstall:
- apk add --no-cache jq
setup:
- |
env | grep MODULE_IMAGE_DIGEST | jq -Rn '
reduce inputs as $i (
{};
. * (
$i | ltrimstr("MODULE_IMAGE_DIGEST_") | sub("=";"_") |
split("_") as [$imageName, $digest] |
{($imageName): $digest}
)
)
' > /images_digests.json
cat images_digests.json
---
image: bundle
fromImage: builder/scratch
import:
- image: prepare-bundle
add: /prep-bundle
to: /
after: setup
---
image: prepare-bundle
fromImage: builder/alpine
import:
- image: images-digests
add: /
to: /prep-bundle
after: setup
includePaths:
- images_digests.json
- image: go-hooks-artifact
add: /go-hooks
to: /prep-bundle/hooks/go
after: setup
git:
- add: /
to: /prep-bundle
stageDependencies:
install:
- '**/*'
includePaths:
- charts
- crds
- build/components
- docs
- openapi
- monitoring
- templates
- Chart.yaml
- module.yaml
- .helmignore
excludePaths:
- build/components/README.md
- docs/images/*.drawio
- docs/images/*.sh
- docs/internal
shell:
install:
- ls -la /prep-bundle
---
image: release-channel-version
fromImage: builder/scratch
import:
- image: prepare-bundle
add: /prep-bundle
to: /
after: install
includePaths:
- module.yaml
shell:
install:
- echo '{"version":"{{ env "MODULES_MODULE_TAG" "dev" }}"}' > version.json