mirror of
https://github.com/kairos-io/packages.git
synced 2025-08-24 10:41:53 +00:00
Add guards for templates (#114)
This commit is contained in:
parent
e54fa12131
commit
4d565617ac
@ -1,3 +1,4 @@
|
||||
{{ if .Values.init }}
|
||||
{{ if eq .Values.init "systemd" }}
|
||||
image: golang:1.18
|
||||
prelude:
|
||||
@ -17,3 +18,4 @@ steps:
|
||||
- cd provider-kairos && go build -o agent-provider-kairos
|
||||
- mv provider-kairos/agent-provider-kairos /system/providers/agent-provider-kairos
|
||||
- ln -s /system/providers/agent-provider-kairos /usr/bin/kairos
|
||||
{{ end }}
|
@ -7,9 +7,11 @@ steps:
|
||||
{{ if .Values.distribution }}
|
||||
{{if eq .Values.distribution "opensuse" }}
|
||||
- zypper in -y --no-recommends {{.Values.packages}}
|
||||
{{ if .Values.arch }}
|
||||
{{ if eq .Values.arch "arm64" }}
|
||||
- zypper in -y {{.Values.packages_arm}}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
- zypper cc
|
||||
{{ if .Values.arch }}
|
||||
{{ if eq .Values.arch "arm64" }}
|
||||
@ -28,11 +30,13 @@ steps:
|
||||
{{else if eq .Values.distribution "ubuntu" }}
|
||||
# Note for future issues with grub: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1879558 https://github.com/rancher-sandbox/cOS-toolkit/pull/101#discussion_r621929109
|
||||
- apt-get update
|
||||
{{ if .Values.arch }}
|
||||
{{ if eq .Values.arch "arm64" }}
|
||||
- DEBIAN_FRONTEND=noninteractive apt-get install -y {{.Values.packages_arm}}
|
||||
{{ else }}
|
||||
- DEBIAN_FRONTEND=noninteractive apt-get install -y {{.Values.packages}}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
- apt-get clean
|
||||
- |
|
||||
kernel=$(ls /boot/vmlinuz-* | head -n1) && \
|
||||
|
@ -2,6 +2,7 @@
|
||||
image: {{.Values.image}}
|
||||
|
||||
{{if eq .Values.distribution "opensuse"}}
|
||||
{{ if .Values.arch }}
|
||||
{{ if eq .Values.arch "arm64" }}
|
||||
prelude:
|
||||
- zypper in -y grub2-arm64-efi grub2
|
||||
@ -12,6 +13,7 @@ prelude:
|
||||
- zypper in -y grub2-i386-pc grub2-x86_64-efi grub2
|
||||
{{ end }}
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
steps:
|
||||
- mkdir /grub-artifacts
|
||||
|
@ -1,4 +1,5 @@
|
||||
# This is only for amd64
|
||||
{{ if .Values.arch }}
|
||||
{{ if eq .Values.arch "" }}
|
||||
image: registry.opensuse.org/opensuse/leap:15.3
|
||||
|
||||
@ -13,3 +14,4 @@ excludes:
|
||||
# This is shipped by system/grub2-efi
|
||||
- usr/share/efi/.*/grub.efi
|
||||
{{end}}
|
||||
{{end}}
|
@ -1,4 +1,5 @@
|
||||
# This is only for amd64
|
||||
{{ if .Values.arch }}
|
||||
{{ if eq .Values.arch "" }}
|
||||
requires:
|
||||
- name: "toolchain-go"
|
||||
@ -16,3 +17,4 @@ steps:
|
||||
includes:
|
||||
- usr/bin/.*|usr/bin
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
Loading…
Reference in New Issue
Block a user