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
13 changes: 6 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Tests and Build

on:
push:
branches: [ "*" ]
tags: [ "v*" ]
pull_request:
branches: [ main ]
Expand Down Expand Up @@ -59,7 +58,7 @@ jobs:
- kalilinux
- alpine
- centos
- quay.io/centos/centos:stream9
- quay.io/centos/centos:stream

steps:
- name: Checkout
Expand Down Expand Up @@ -102,13 +101,13 @@ jobs:
strategy:
matrix:
image:
- alpine:3.17
- ubuntu:20.04
- alpine:3.23
- ubuntu:22.04
- debian:10
- debian:11
- ubuntu:24.04
- debian:12
- debian:13
- centos:8
- quay.io/centos/centos:stream9
- quay.io/centos/centos:stream10
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
20 changes: 12 additions & 8 deletions config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ func TestConfig(t *testing.T) {
image string
config Config
}{
{
image: "ubuntu:18.04",
config: configDebian,
},
{
image: "ubuntu:20.04",
config: configUbuntu,
Expand All @@ -80,20 +76,24 @@ func TestConfig(t *testing.T) {
image: "ubuntu:22.04",
config: configUbuntu,
},
{
image: "ubuntu:24.04",
config: configUbuntu,
},
{
image: "ubuntu:latest",
config: configUbuntu,
},
{
image: "debian:9",
image: "debian:11",
config: configDebian,
},
{
image: "debian:10",
image: "debian:12",
config: configDebian,
},
{
image: "debian:11",
image: "debian:13",
config: configDebian,
},
{
Expand All @@ -105,7 +105,7 @@ func TestConfig(t *testing.T) {
config: configDebian,
},
{
image: "alpine:3.16",
image: "alpine:3.20",
config: configAlpine,
},
{
Expand All @@ -120,6 +120,10 @@ func TestConfig(t *testing.T) {
image: "quay.io/centos/centos:stream9",
config: configCentOS,
},
{
image: "quay.io/centos/centos:stream10",
config: configCentOS,
},
}
exec.SetDebug(true)

Expand Down
12 changes: 7 additions & 5 deletions e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ type img struct {

var (
images = []img{
{name: "alpine:3.17", luks: "Enter passphrase for /dev/sda2:"},
{name: "ubuntu:20.04", luks: "Please unlock disk root:"},
{name: "alpine:3.23", luks: "Enter passphrase for /dev/sda2:"},
{name: "ubuntu:22.04", luks: "Please unlock disk root:"},
{name: "debian:10", luks: "Please unlock disk root:"},
{name: "debian:11", luks: "Please unlock disk root:"},
{name: "ubuntu:24.04", luks: "Please unlock disk root:"},
{name: "debian:12", luks: "Please unlock disk root:"},
{name: "debian:13", luks: "Please unlock disk root:"},
{name: "centos:8", luks: "Please enter passphrase for disk"},
{name: "quay.io/centos/centos:stream9", luks: "Please enter passphrase for disk"},
{name: "quay.io/centos/centos:stream10", luks: "Please enter passphrase for disk"},
}
imgNames = func() []string {
var imgs []string
Expand Down Expand Up @@ -147,6 +147,8 @@ imgs:
login := []byte("login:")
password := []byte("Password:")
s := bufio.NewScanner(outr)
// fix failed to scan output: bufio.Scanner: token too long
s.Buffer(make([]byte, 0, 64*1024), 10*1024*1024)
s.Split(func(data []byte, atEOF bool) (advance int, token []byte, err error) {
if i := bytes.Index(data, []byte(img.luks)); i >= 0 {
return i + len(img.luks), []byte(img.luks), nil
Expand Down
2 changes: 1 addition & 1 deletion templates/alpine.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ RUN apk add --no-cache \
{{- if .GrubEFI }}
grub-efi \
{{- end }}
grub
grub || true
{{- end }}
Loading