Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions images/cdi-artifact/werf.inc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ shell:
---
image: {{ $.ImageName }}-cbuilder
final: false
fromImage: builder/golang-bookworm-1.23
fromImage: {{ eq $.SVACE_ENABLED "false" | ternary "builder/golang-bookworm-1.23" "builder/alt-go-svace" }}
git:
- add: /images/{{ $.ImageName }}/static_binaries
to: /
Expand All @@ -118,14 +118,21 @@ git:
- '*.c'
shell:
install:
{{- if eq $.SVACE_ENABLED "false" }}
{{- include "debian packages proxy" . | nindent 2 }}
- |
apt-get install --yes musl-dev musl-tools
- apt-get install --yes musl-dev musl-tools
{{- include "debian packages clean" . | nindent 2 }}
{{- else }}
{{- include "alt packages proxy" . | nindent 2 }}
- apt-get -qq install -y musl-devel musl-devel-static
{{- include "alt packages clean" . | nindent 2 }}
{{- end }}
- |
echo "Building simple app that prints hello cdi"
mkdir -p /bins
musl-gcc -static -Os -o /bins/hello hello.c
musl-gcc -static -Os -o /bins/printFile print_file_context.c
{{- $_ := set $ "ProjectName" (list $.ImageName "hello" | join "/") }}
{{- include "image-build.build" (set $ "BuildCommand" `musl-gcc -static -Os -o /bins/hello hello.c`) | nindent 6 }}
{{- $_ := set $ "ProjectName" (list $.ImageName "printFile" | join "/") }}
{{- include "image-build.build" (set $ "BuildCommand" `musl-gcc -static -Os -o /bins/printFile print_file_context.c`) | nindent 6 }}
strip /bins/hello
strip /bins/printFile
5 changes: 3 additions & 2 deletions images/cdi-cloner/werf.inc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ shell:
---
image: {{ $.ImageName }}-gobuild
final: false
fromImage: builder/golang-bookworm-1.23
fromImage: {{ eq $.SVACE_ENABLED "false" | ternary "builder/golang-bookworm-1.23" "builder/alt-go-svace" }}
git:
- add: /images/{{ $.ImageName }}/cloner-startup
to: /app
Expand All @@ -63,4 +63,5 @@ shell:
- |
mkdir -p /cdi-binaries
cd /app
go build -ldflags="-s -w" -o /cdi-binaries/cloner-startup ./cmd/cloner-startup
{{- $_ := 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 }}
12 changes: 10 additions & 2 deletions images/virt-launcher/werf.inc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ shell:
---
image: {{ $.ImageName }}-cbuilder
final: false
fromImage: builder/golang-bookworm-1.23
fromImage: {{ eq $.SVACE_ENABLED "false" | ternary "builder/golang-bookworm-1.23" "builder/alt-go-svace" }}
git:
- add: /images/{{ $.ImageName }}/static_binaries
to: /
Expand All @@ -470,12 +470,20 @@ git:
- '*.c'
shell:
beforeInstall:
{{- if eq $.SVACE_ENABLED "false" }}
{{- include "debian packages proxy" . | nindent 2 }}
- apt-get install --yes musl-dev musl-tools
{{- include "debian packages clean" . | nindent 2 }}
{{- else }}
{{- include "alt packages proxy" . | nindent 2 }}
- apt-get -qq install -y musl-devel musl-devel-static
{{- include "alt packages clean" . | nindent 2 }}
{{- end }}
install:
- |
echo "Building simple app that prints I'am temp pod"
mkdir -p /bins
musl-gcc -static -Os -o /bins/temp_pod temp_pod.c

{{- $_ := set $ "ProjectName" (list $.ImageName "temp_pod" | join "/") }}
{{- include "image-build.build" (set $ "BuildCommand" `musl-gcc -static -Os -o /bins/temp_pod temp_pod.c`) | nindent 6 }}
strip /bins/temp_pod
Loading