Skip to content

Commit

Permalink
Fix ubuntu dockerfile and invocation in CI
Browse files Browse the repository at this point in the history
Signed-off-by: Dimitris Karakasilis <[email protected]>
  • Loading branch information
jimmykarily committed Oct 11, 2023
1 parent 9f27a44 commit eafb8dd
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 47 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/image-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,68 +13,70 @@ jobs:
core:
uses: ./.github/workflows/reusable-build-flavor.yaml
with:
flavor: ubuntu

flavor: ubuntu-23-04
family: ubuntu
base_image: ubuntu:23.04
artifact: ubuntu
install:
uses: ./.github/workflows/reusable-install-test.yaml
with:
flavor: ubuntu
flavor: ubuntu-23-04
needs:
- core

zfs:
uses: ./.github/workflows/reusable-zfs-test.yaml
with:
flavor: ubuntu
flavor: ubuntu-23-04
needs:
- core

acceptance:
uses: ./.github/workflows/reusable-qemu-acceptance-test.yaml
with:
flavor: ubuntu
flavor: ubuntu-23-04
needs:
- core

bundles:
uses: ./.github/workflows/reusable-qemu-bundles-test.yaml
with:
flavor: ubuntu
flavor: ubuntu-23-04
needs:
- core

reset:
uses: ./.github/workflows/reusable-qemu-reset-test.yaml
with:
flavor: ubuntu
flavor: ubuntu-23-04
needs:
- core

netboot:
uses: ./.github/workflows/reusable-qemu-netboot-test.yaml
with:
flavor: ubuntu
flavor: ubuntu-23-04
needs:
- core

upgrade:
uses: ./.github/workflows/reusable-upgrade-with-cli-test.yaml
with:
flavor: ubuntu
flavor: ubuntu-23-04
needs:
- core

upgrade-latest:
uses: ./.github/workflows/reusable-upgrade-latest-test.yaml
with:
flavor: ubuntu
flavor: ubuntu-23-04
needs:
- core

encryption:
uses: ./.github/workflows/reusable-encryption-test.yaml
with:
flavor: ubuntu
flavor: ubuntu-23-04
label: ${{ matrix.label }}
needs:
- core
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/reusable-build-flavor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ on:
flavor:
required: true
type: string
family:
required: true
type: string
artifact:
required: true
type: string
base_image:
required: true
type: string

jobs:
build:
Expand Down Expand Up @@ -75,7 +84,7 @@ jobs:
FLAVOR: ${{ inputs.flavor }}
FAMILY: ${{ inputs.family }}
ARTIFACT: ${{ inputs.artifact }}
BASE_IMAGE: ${{ inputs.baseImage }}
BASE_IMAGE: ${{ inputs.base_image }}
VERSION: latest
run: |
# Desired artifact names:
Expand Down
70 changes: 35 additions & 35 deletions images/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ ARG MODEL=generic
# the default value is empty, which means the HWE kernel WILL be installed
# if you want to disable the HWE kernel, set HWE to "-non-hwe"
ARG HWE=""
ARG BASE_IMAGE=ubuntu:rolling
ARG BASE_IMAGE=ubuntu:23.04
# TARGETARCH is used to determine the architecture of the image
# it is already set by Docker so it doesn't need to be defined here

###############################################################
#### Upstream Images ####
###############################################################
FROM ${BASE_IMAGE} AS ubuntu-upstream
FROM ${BASE_IMAGE} AS ubuntu-23-04-upstream

FROM ${BASE_IMAGE} AS ubuntu-20-lts-upstream
FROM ${BASE_IMAGE} AS ubuntu-20-04-upstream

FROM ${BASE_IMAGE} AS ubuntu-22-lts-upstream
FROM ${BASE_IMAGE} AS ubuntu-22-04-upstream


###############################################################
Expand Down Expand Up @@ -127,15 +127,15 @@ RUN apt-get update \
###############################################################
#### Common to an Arch and Flavor ####
###############################################################
FROM ${TARGETARCH} AS base-20-lts
FROM ${TARGETARCH} AS base-20-04
RUN apt-get update && apt-get install -y --no-install-recommends \
file \
fuse \
patch \
policykit-1 \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

FROM ${TARGETARCH} AS base-22-lts
FROM ${TARGETARCH} AS base-22-04
RUN apt-get update && apt-get install -y --no-install-recommends \
dracut-live \
firmware-sof-signed \
Expand All @@ -144,33 +144,33 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
polkitd \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

FROM base-22-lts AS hwe-22-lts
FROM base-22-04 AS hwe-22-04
RUN apt-get update && apt-get install -y --no-install-recommends \
linux-image-generic-hwe-22.04 \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

FROM base-20-lts AS hwe-20-lts
FROM base-20-04 AS hwe-20-04
RUN apt-get update && apt-get install -y --no-install-recommends \
linux-image-generic-hwe-20.04 \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

FROM base-22-lts AS non-hwe-20-lts
FROM base-22-04 AS non-hwe-20-04
RUN apt-get update && apt-get install -y --no-install-recommends \
linux-image-generic \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

FROM non-hwe-20-lts AS non-hwe-22-lts
FROM non-hwe-20-04 AS non-hwe-22-04

FROM hwe-22-lts AS amd64-ubuntu
FROM hwe-22-lts AS amd64-ubuntu-22-lts
FROM hwe-20-lts AS amd64-ubuntu-20-lts
FROM hwe-22-04 AS amd64-ubuntu-23-04
FROM hwe-22-04 AS amd64-ubuntu-22-04
FROM hwe-20-04 AS amd64-ubuntu-20-04

FROM non-hwe-22-lts AS amd64-ubuntu-22-lts-non-hwe
FROM non-hwe-20-lts AS amd64-ubuntu-20-lts-non-hwe
FROM non-hwe-22-04 AS amd64-ubuntu-22-04-non-hwe
FROM non-hwe-20-04 AS amd64-ubuntu-20-04-non-hwe

FROM base-22-lts AS arm64-ubuntu
FROM base-22-lts AS arm64-ubuntu-22-lts
FROM base-20-lts AS arm64-ubuntu-20-lts
FROM base-22-04 AS arm64-ubuntu-23-04
FROM base-22-04 AS arm64-ubuntu-22-04
FROM base-20-04 AS arm64-ubuntu-20-04

###############################################################
#### Common to a Single Model ####
Expand All @@ -187,32 +187,32 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
COPY rpi/config.txt /boot/config.txt

FROM rpicommon AS ubuntu-20-lts-rpi
FROM rpicommon AS ubuntu-20-04-rpi
RUN apt-get update && apt-get install -y --no-install-recommends \
linux-firmware-raspi2 \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

FROM rpicommon AS ubuntu-rpi
FROM rpicommon AS ubuntu-23-04-rpi
RUN apt-get update && apt-get install -y --no-install-recommends \
linux-firmware-raspi \
linux-modules-extra-raspi \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

FROM generic AS amd64-ubuntu-generic
FROM generic AS amd64-ubuntu-22-lts-generic
FROM generic AS amd64-ubuntu-20-lts-generic
FROM generic AS arm64-ubuntu-generic
FROM ubuntu-rpi AS arm64-ubuntu-rpi3
FROM ubuntu-rpi AS arm64-ubuntu-rpi4
FROM ubuntu-rpi AS arm64-ubuntu-22-lts-rpi3
FROM ubuntu-rpi AS arm64-ubuntu-22-lts-rpi4
FROM ubuntu-20-lts-rpi AS arm64-ubuntu-20-lts-rpi3
FROM ubuntu-20-lts-rpi AS arm64-ubuntu-20-lts-rpi4
FROM generic AS amd64-ubuntu-23-04-generic
FROM generic AS amd64-ubuntu-22-04-generic
FROM generic AS amd64-ubuntu-20-04-generic
FROM generic AS arm64-ubuntu-23-04-generic
FROM ubuntu-23-04-rpi AS arm64-ubuntu-23-04-rpi3
FROM ubuntu-23-04-rpi AS arm64-ubuntu-23-04-rpi4
FROM ubuntu-23-04-rpi AS arm64-ubuntu-22-04-rpi3
FROM ubuntu-23-04-rpi AS arm64-ubuntu-22-04-rpi4
FROM ubuntu-20-04-rpi AS arm64-ubuntu-20-04-rpi3
FROM ubuntu-20-04-rpi AS arm64-ubuntu-20-04-rpi4

###############################################################
#### Common to a Single Flavor ####
###############################################################
FROM ${TARGETARCH}-${FLAVOR}-${MODEL} AS ubuntu
FROM ${TARGETARCH}-${FLAVOR}-${MODEL} AS ubuntu-23-04
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
dbus-user-session \
Expand All @@ -221,11 +221,11 @@ RUN apt-get update \
systemd-resolved \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

FROM ${TARGETARCH}-${FLAVOR}-${MODEL} AS ubuntu-20-lts
FROM ${TARGETARCH}-${FLAVOR}-${MODEL} AS ubuntu-20-lts-non-hwe
FROM ${TARGETARCH}-${FLAVOR}-${MODEL} AS ubuntu-22-lts-non-hwe
FROM ${TARGETARCH}-${FLAVOR}-${MODEL} AS ubuntu-20-04
FROM ${TARGETARCH}-${FLAVOR}-${MODEL} AS ubuntu-20-04-non-hwe
FROM ${TARGETARCH}-${FLAVOR}-${MODEL} AS ubuntu-22-04-non-hwe

FROM ubuntu-22-lts-non-hwe AS ubuntu-22-lts
FROM ubuntu-22-04-non-hwe AS ubuntu-22-04
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
systemd-hwe-hwdb \
Expand Down

0 comments on commit eafb8dd

Please sign in to comment.