Skip to content

Commit

Permalink
chore(ci): Use kernel-cache for kernel-version (#209)
Browse files Browse the repository at this point in the history
Co-authored-by: Benjamin Sherman <benjamin@holyarmy.org>
  • Loading branch information
m2Giles and bsherman authored Nov 12, 2024
1 parent c1db889 commit be48008
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 36 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on:
pull_request:
branches:
- main
#schedule:
# - cron: '50 2 * * *' # 2:50am-ish UTC everyday (approx 45 minutes after akmods images run)
schedule:
- cron: '50 2 * * *' # 2:50am-ish UTC everyday (approx 45 minutes after akmods images run)
workflow_dispatch:

jobs:
Expand Down
59 changes: 25 additions & 34 deletions .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,6 @@ jobs:
skopeo inspect docker://quay.io/fedora/fedora-coreos:${{ inputs.coreos_version }} > inspect.json
kernel=$(jq -r '.["Labels"]["ostree.linux"]' inspect.json)
if [ -z "$kernel" ] || [ "null" = "$kernel" ]; then
echo "inspected linux (kernel) version must not be empty or null"
exit 1
fi
image=$(jq -r '.["Labels"]["org.opencontainers.image.version"]' inspect.json)
if [ -z "$image" ] || [ "null" = "$image" ]; then
echo "inspected image version must not be empty or null"
Expand All @@ -71,6 +65,13 @@ jobs:
exit 1
fi
kernel=$(skopeo inspect docker://ghcr.io/ublue-os/coreos-${{ inputs.coreos_version }}-kernel:${fedora} | jq -r '.["Labels"]["ostree.linux"]')
if [ -z "$kernel" ] || [ "null" = "$kernel" ]; then
echo "inspected linux (kernel) version must not be empty or null"
exit 1
fi
echo "kernel=$kernel" >> $GITHUB_OUTPUT
echo "image=$image" >> $GITHUB_OUTPUT
echo "fedora=$fedora" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -142,20 +143,16 @@ jobs:
echo "env.KERNEL_VERSION must not be empty or null"
exit 1
fi
skopeo inspect docker://quay.io/fedora/fedora-coreos:${{ inputs.coreos_version }} > inspect.json
kernel=$(jq -r '.["Labels"]["ostree.linux"]' inspect.json)
if [[ "${{ env.KERNEL_VERSION }}" != "$kernel"* ]]; then
echo "pulled coreos image kernel ($kernel) does not match expected kernel (${{ env.KERNEL_VERSION }})"
exit 1
fi
skopeo inspect docker://${{ env.IMAGE_REGISTRY }}/${{ env.KERNEL_FLAVOR }}-kernel:${{ env.FEDORA_VERSION }} > inspect.json
kernel=$(jq -r '.["Labels"]["ostree.linux"]' inspect.json)
#Use Podman Inspect instead of skopeo for local checks.
podman inspect ${{ env.IMAGE_REGISTRY }}/${{ env.KERNEL_FLAVOR }}-kernel:${{ env.FEDORA_VERSION }} > inspect.json
kernel=$(jq -r '.[]["Config"]["Labels"]["ostree.linux"]' inspect.json)
if [[ "${{ env.KERNEL_VERSION }}" != "$kernel"* ]]; then
echo "pulled kernel-cache image kernel ($kernel) does not match expected kernel (${{ env.KERNEL_VERSION }})"
exit 1
fi
skopeo inspect docker://${{ env.IMAGE_REGISTRY }}/akmods:${{ env.KERNEL_FLAVOR }}-${{ env.FEDORA_VERSION }} > inspect.json
kernel=$(jq -r '.["Labels"]["ostree.linux"]' inspect.json)
podman inspect ${{ env.IMAGE_REGISTRY }}/akmods:${{ env.KERNEL_FLAVOR }}-${{ env.FEDORA_VERSION }} > inspect.json
kernel=$(jq -r '.[]["Config"]["Labels"]["ostree.linux"]' inspect.json)
if [[ "${{ env.KERNEL_VERSION }}" != "$kernel"* ]]; then
echo "pulled akmods image kernel ($kernel) does not match expected kernel (${{ env.KERNEL_VERSION }})"
exit 1
Expand All @@ -166,8 +163,8 @@ jobs:
shell: bash
run: |
set -x
skopeo inspect docker://${{ env.IMAGE_REGISTRY }}/akmods-nvidia:${{ env.KERNEL_FLAVOR }}-${{ env.FEDORA_VERSION }} > inspect.json
kernel=$(jq -r '.["Labels"]["ostree.linux"]' inspect.json)
podman inspect ${{ env.IMAGE_REGISTRY }}/akmods-nvidia:${{ env.KERNEL_FLAVOR }}-${{ env.FEDORA_VERSION }} > inspect.json
kernel=$(jq -r '.[]["Config"]["Labels"]["ostree.linux"]' inspect.json)
if [[ "${{ env.KERNEL_VERSION }}" != "$kernel"* ]]; then
echo "pulled akmods-nvidia image kernel ($kernel) does not match expected kernel (${{ env.KERNEL_VERSION }})"
exit 1
Expand All @@ -178,8 +175,8 @@ jobs:
shell: bash
run: |
set -x
skopeo inspect docker://${{ env.IMAGE_REGISTRY }}/akmods-zfs:${{ env.KERNEL_FLAVOR }}-${{ env.FEDORA_VERSION }} > inspect.json
kernel=$(jq -r '.["Labels"]["ostree.linux"]' inspect.json)
podman inspect ${{ env.IMAGE_REGISTRY }}/akmods-zfs:${{ env.KERNEL_FLAVOR }}-${{ env.FEDORA_VERSION }} > inspect.json
kernel=$(jq -r '.[]["Config"]["Labels"]["ostree.linux"]' inspect.json)
if [[ "${{ env.KERNEL_VERSION }}" != "$kernel"* ]]; then
echo "pulled akmods-zfs image kernel ($kernel) does not match expected kernel (${{ env.KERNEL_VERSION }})"
exit 1
Expand Down Expand Up @@ -412,20 +409,14 @@ jobs:
echo "env.KERNEL_VERSION must not be empty or null"
exit 1
fi
skopeo inspect docker://quay.io/fedora/fedora-coreos:${{ inputs.coreos_version }} > inspect.json
kernel=$(jq -r '.["Labels"]["ostree.linux"]' inspect.json)
if [[ "${{ env.KERNEL_VERSION }}" != "$kernel"* ]]; then
echo "pulled coreos image kernel ($kernel) does not match expected kernel (${{ env.KERNEL_VERSION }})"
exit 1
fi
skopeo inspect docker://${{ env.IMAGE_REGISTRY }}/${{ env.KERNEL_FLAVOR }}-kernel:${{ env.FEDORA_VERSION }} > inspect.json
kernel=$(jq -r '.["Labels"]["ostree.linux"]' inspect.json)
podman inspect ${{ env.IMAGE_REGISTRY }}/${{ env.KERNEL_FLAVOR }}-kernel:${{ env.FEDORA_VERSION }} > inspect.json
kernel=$(jq -r '.[]["Config"]["Labels"]["ostree.linux"]' inspect.json)
if [[ "${{ env.KERNEL_VERSION }}" != "$kernel"* ]]; then
echo "pulled kernel-cache image kernel ($kernel) does not match expected kernel (${{ env.KERNEL_VERSION }})"
exit 1
fi
skopeo inspect docker://${{ env.IMAGE_REGISTRY }}/akmods:${{ env.KERNEL_FLAVOR }}-${{ env.FEDORA_VERSION }} > inspect.json
kernel=$(jq -r '.["Labels"]["ostree.linux"]' inspect.json)
podman inspect ${{ env.IMAGE_REGISTRY }}/akmods:${{ env.KERNEL_FLAVOR }}-${{ env.FEDORA_VERSION }} > inspect.json
kernel=$(jq -r '.[]["Config"]["Labels"]["ostree.linux"]' inspect.json)
if [[ "${{ env.KERNEL_VERSION }}" != "$kernel"* ]]; then
echo "pulled akmods image kernel ($kernel) does not match expected kernel (${{ env.KERNEL_VERSION }})"
exit 1
Expand All @@ -436,8 +427,8 @@ jobs:
shell: bash
run: |
set -x
skopeo inspect docker://${{ env.IMAGE_REGISTRY }}/akmods-nvidia:${{ env.KERNEL_FLAVOR }}-${{ env.FEDORA_VERSION }} > inspect.json
kernel=$(jq -r '.["Labels"]["ostree.linux"]' inspect.json)
podman inspect ${{ env.IMAGE_REGISTRY }}/akmods-nvidia:${{ env.KERNEL_FLAVOR }}-${{ env.FEDORA_VERSION }} > inspect.json
kernel=$(jq -r '.[]["Config"]["Labels"]["ostree.linux"]' inspect.json)
if [[ "${{ env.KERNEL_VERSION }}" != "$kernel"* ]]; then
echo "pulled akmods-nvidia image kernel ($kernel) does not match expected kernel (${{ env.KERNEL_VERSION }})"
exit 1
Expand All @@ -448,8 +439,8 @@ jobs:
shell: bash
run: |
set -x
skopeo inspect docker://${{ env.IMAGE_REGISTRY }}/akmods-zfs:${{ env.KERNEL_FLAVOR }}-${{ env.FEDORA_VERSION }} > inspect.json
kernel=$(jq -r '.["Labels"]["ostree.linux"]' inspect.json)
podman inspect ${{ env.IMAGE_REGISTRY }}/akmods-zfs:${{ env.KERNEL_FLAVOR }}-${{ env.FEDORA_VERSION }} > inspect.json
kernel=$(jq -r '.[]["Config"]["Labels"]["ostree.linux"]' inspect.json)
if [[ "${{ env.KERNEL_VERSION }}" != "$kernel"* ]]; then
echo "pulled akmods-zfs image kernel ($kernel) does not match expected kernel (${{ env.KERNEL_VERSION }})"
exit 1
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Please take a look at the included modifications, and help us improve uCore if t

## Table of Contents <!-- omit in toc -->

- [Announcements](#announcements)
- [Features](#features)
- [Images](#images)
- [`fedora-coreos`](#fedora-coreos)
Expand Down Expand Up @@ -43,6 +44,20 @@ Please take a look at the included modifications, and help us improve uCore if t
- [DIY](#diy)
- [Metrics](#metrics)

## Announcements

### 2024.11.12 - uCore has updated to Fedora 41

As of today our upstream Fedora CoreOS stable image updated to Fedora 41 under the hood, so expect a lot of package updates.

### 2024.11.12 - uCore *stable* has pinned to kernel version *6.11.3*

Kernel version `6.11.3` was the previous *stable* update's kernel, and despite the update to Fedora 41, we've stuck with `6.11.3` rather than updating to `6.11.5` from upstream.

This is due to a kernel bug in versions `6.11.4`/`6.11.5` which [breaks tailscale status reporting](https://github.com/tailscale/tailscale/issues/13863). As many users of uCore do use tailscale, we've decided to be extra cautious and hold back the kernel, even though the rest of stable updated as usual.

We expect the next update of Fedora CoreOS to be on `6.11.6` per the current state of the testing stream. So uCore will follow when that update occurs.

## Features

The uCore project builds four images, each with different tags for different features.
Expand Down

0 comments on commit be48008

Please sign in to comment.