Skip to content

Commit

Permalink
Adding orange tests in CI
Browse files Browse the repository at this point in the history
Signed-off-by: David Cassany <[email protected]>
  • Loading branch information
davidcassany committed Nov 27, 2023
1 parent ea0c6ef commit 73b41a4
Show file tree
Hide file tree
Showing 9 changed files with 61 additions and 148 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
strategy:
matrix:
arch: ${{fromJson(needs.detect.outputs.arch)}}
flavor: ['green', 'tumbleweed', 'blue']
flavor: ['green', 'tumbleweed', 'blue', 'orange']
uses: ./.github/workflows/build_and_test.yaml
with:
arch: ${{ matrix.arch }}
Expand Down
32 changes: 32 additions & 0 deletions examples/orange/05_network.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Example network configuration for Ubuntu based systems
name: "Default network configuration"
stages:
initramfs:
- name: "Setup network"
files:
- path: /etc/netplan/elemental_setup.yaml
content: |
network:
version: 2
renderer: networkd
ethernets:
lan0:
dhcp4: true
permissions: 0600
owner: 0
group: 0
- path: /etc/ssh/sshd_config.d/root_login.conf
content: |
PermitRootLogin yes
permissions: 0600
owner: 0
group: 0
- path: /etc/udev/rules.d/70-persistent-net.rules
content: |
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0"
permissions: 0600
owner: 0
group: 0
commands:
- ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
- netplan apply
17 changes: 7 additions & 10 deletions examples/orange/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG VERSION
FROM ${TOOLKIT_REPO}:${VERSION} as TOOLKIT

# OS base image of our choice
FROM ubuntu:23.04 as OS
FROM ubuntu:22.04 as OS
ARG REPO
ARG VERSION
ENV VERSION=${VERSION}
Expand All @@ -23,7 +23,8 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
shim-signed \
haveged \
systemd \
systemd-resolved \
systemd-sysv \
systemd-timesyncd \
openssh-server \
openssh-client \
tzdata \
Expand All @@ -45,6 +46,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
iproute2 \
dbus-daemon \
patch \
netplan.io \
xz-utils

# Create non FHS paths
Expand All @@ -60,14 +62,6 @@ RUN systemctl enable systemd-networkd.service && \
# Enable /tmp to be on tmpfs
RUN cp /usr/share/systemd/tmp.mount /etc/systemd/system

# This is patches are fix upstream dracut, see https://github.com/dracutdevs/dracut/pull/2525
ADD patches /

RUN cd /usr/lib/dracut && \
patch -p 1 -f -i /0001-fix-dmsquash-live-restore-compatibility-with-earlier.patch && \
patch -p 1 -f -i /0001-fix-overlayfs-split-overlayfs-mount-in-two-steps.patch && \
rm /*.patch

# Generate initrd with required elemental services
RUN elemental --debug init -f

Expand All @@ -78,6 +72,9 @@ RUN echo IMAGE_REPO=\"${REPO}\" >> /etc/os-release && \
echo TIMESTAMP="`date +'%Y%m%d%H%M%S'`" >> /etc/os-release
RUN echo GRUB_ENTRY_NAME=\"Elemental\" >> /etc/os-release

# Adding specific network configuration based on netplan
ADD 05_network.yaml /system/oem/05_network.yaml

# Arrange bootloader binaries into /usr/lib/elemental/bootloader
# this way elemental installer can easily fetch them
RUN mkdir -p /usr/lib/elemental/bootloader && \
Expand Down

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ require (
github.com/mudler/yip v1.4.0
github.com/onsi/ginkgo/v2 v2.9.3
github.com/onsi/gomega v1.27.6
github.com/rancher-sandbox/ele-testhelpers v0.0.0-20231031082920-8b1cf3f8c16f
github.com/rancher-sandbox/ele-testhelpers v0.0.0-20231121104300-eb56c5436c4e
github.com/sanity-io/litter v1.5.5
github.com/sirupsen/logrus v1.9.0
github.com/spf13/cobra v1.7.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,8 @@ github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/rancher-sandbox/ele-testhelpers v0.0.0-20231031082920-8b1cf3f8c16f h1:GUKwalxjMDhbxMmhhBFZ91jubBOxwYvu1q8sA+jk2Jg=
github.com/rancher-sandbox/ele-testhelpers v0.0.0-20231031082920-8b1cf3f8c16f/go.mod h1:Ex+a/ng4u2BvcGQdQjTHI48h88bQ6k2a7q8rnvU0XbQ=
github.com/rancher-sandbox/ele-testhelpers v0.0.0-20231121104300-eb56c5436c4e h1:1pWxPAbjDxLWadV1goUOVZBzUqDKkD8pqwE2Nbzpd30=
github.com/rancher-sandbox/ele-testhelpers v0.0.0-20231121104300-eb56c5436c4e/go.mod h1:Ex+a/ng4u2BvcGQdQjTHI48h88bQ6k2a7q8rnvU0XbQ=
github.com/rancher-sandbox/linuxkit v1.0.1 h1:LYKmv1XozmQGRV6Ilm88Fx/t54okVa8rx00wLJPZkBw=
github.com/rancher-sandbox/linuxkit v1.0.1/go.mod h1:n6Fkjc5qoMeWrnLSA5oqUF8ZzFKMrM960CtBwfvH1ZM=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
Expand Down
30 changes: 17 additions & 13 deletions vendor/github.com/rancher-sandbox/ele-testhelpers/vm/sut.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ github.com/pkg/errors
# github.com/pkg/xattr v0.4.9
## explicit; go 1.14
github.com/pkg/xattr
# github.com/rancher-sandbox/ele-testhelpers v0.0.0-20231031082920-8b1cf3f8c16f
# github.com/rancher-sandbox/ele-testhelpers v0.0.0-20231121104300-eb56c5436c4e
## explicit; go 1.20
github.com/rancher-sandbox/ele-testhelpers/vm
# github.com/rancher-sandbox/linuxkit v1.0.1
Expand Down

0 comments on commit 73b41a4

Please sign in to comment.