Skip to content

Commit 2e6a6eb

Browse files
universal-itengineerdiafour
authored andcommitted
add context in template 'image mount points'
Signed-off-by: Nikita Korolev <[email protected]>
1 parent de040c7 commit 2e6a6eb

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
# add mount points from file mount_points.yaml in the build dir
22

33
{{- define "image mount points" }}
4-
{{- $mountPoints := ($.Files.Get (printf "images/%s/mount-points.yaml" $.ImageName) | fromYaml) }}
5-
{{- range $v := $mountPoints.dirs }}
6-
- add: {{ .ModuleDir }}/tools/mounts/mountdir
4+
{{- $mountPoints := ($.Files.Get (printf "images/%s/mount-points.yaml" $.ImageName) | fromYaml) }}
5+
{{- $context := . }}
6+
{{- range $v := $mountPoints.dirs }}
7+
- add: {{ $context.ModuleDir }}/tools/mounts/mountdir
78
to: {{ $v }}
89
owner: 64535
910
group: 64535
1011
stageDependencies:
1112
install:
1213
- "**/*"
13-
{{- end }}
14-
{{- range $v := $mountPoints.files }}
15-
- add: /tools/mounts/mountfile
14+
{{- end }}
15+
{{- range $v := $mountPoints.files }}
16+
- add: {{ $context.ModuleDir }}/tools/mounts/mountfile
1617
to: {{ $v }}
1718
owner: 64535
1819
group: 64535
1920
stageDependencies:
2021
install:
2122
- "**/*"
22-
{{- end }}
23+
{{- end }}
2324
{{- end }}

0 commit comments

Comments
 (0)