-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathwerf.inc.yaml
More file actions
67 lines (65 loc) · 1.63 KB
/
Copy pathwerf.inc.yaml
File metadata and controls
67 lines (65 loc) · 1.63 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
---
image: {{ $.ImageName }}
fromImage: distroless
import:
- image: {{ $.ImageName }}-bins
add: /relocate
to: /
before: setup
imageSpec:
config:
entrypoint: ["/usr/bin/cloner-startup"]
user: 64535
---
{{- $name := print $.ImageName "-dependencies" -}}
{{- define "$name" -}}
binaries:
- /usr/bin/cloner-startup
- /usr/bin/hello
- /usr/bin/cdi-cloner
{{- end -}}
{{ $virtCDIClonerDependencies := include "$name" . | fromYaml }}
image: {{ $.ImageName }}-bins
final: false
fromImage: base-alt-p11-binaries
import:
- image: {{ $.ImageName }}-gobuild
add: /cdi-binaries
to: /usr/bin
includePaths:
- cloner-startup
before: install
- image: cdi-artifact-cbuilder
add: /bins
to: /usr/bin
before: install
includePaths:
- hello
- image: cdi-artifact
add: /cdi-binaries
to: /usr/bin
includePaths:
- cdi-cloner
before: install
# Source https://github.com/kubevirt/containerized-data-importer/blob/v1.60.3/cmd/cdi-cloner/BUILD.bazel
shell:
install:
- |
/relocate_binaries.sh -i "{{ $virtCDIClonerDependencies.binaries | join " " }}" -o /relocate
---
image: {{ $.ImageName }}-gobuild
final: false
fromImage: {{ eq $.SVACE_ENABLED "false" | ternary "builder/golang-bookworm-1.23" "builder/alt-go-svace" }}
git:
- add: /images/{{ $.ImageName }}/cloner-startup
to: /app
stageDependencies:
install:
- '**/*'
shell:
install:
- |
mkdir -p /cdi-binaries
cd /app
{{- $_ := set $ "ProjectName" (list $.ImageName "cdi-cloner" | join "/") }}
{{- include "image-build.build" (set $ "BuildCommand" `go build -ldflags="-s -w" -o /cdi-binaries/cloner-startup ./cmd/cloner-startup`) | nindent 6 }}