Skip to content

Commit

Permalink
feat: enable kernel_pin and pin kernel for stable/gts (#1921)
Browse files Browse the repository at this point in the history
  • Loading branch information
m2Giles authored Nov 12, 2024
1 parent 43a120b commit f1302c8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-image-gts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
matrix:
brand_name: [bluefin]
with:
kernel_pin: 6.11.3-200.fc40.x86_64
brand_name: ${{ matrix.brand_name }}
stream_name: gts

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-image-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
matrix:
brand_name: ${{ fromJson(inputs.brand_name || '["bluefin", "aurora"]') }}
with:
kernel_pin: 6.11.3-200.fc40.x86_64
brand_name: ${{ matrix.brand_name }}
stream_name: stable

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ jobs:
"${{ matrix.base_name }}" \
"${{ matrix.stream_name }}" \
"${{ matrix.image_flavor }}" \
"${{ inputs.kernel_pin }}" \
"1" \
"$(podman inspect ${{ env.IMAGE_NAME }}:${{ env.DEFAULT_TAG }} | jq -r '.[].Config.Labels["org.opencontainers.image.version"]')" \
"${{ github.event_name }}" \
Expand Down
11 changes: 7 additions & 4 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ build image="bluefin" tag="latest" flavor="main" rechunk="0" ghcr="0" pipeline="
if [[ {{ ghcr }} == "0" ]]; then
rm -f /tmp/manifest.json
fi
fedora_version=$(just fedora_version {{ image }} {{ tag }} {{ flavor }})
fedora_version=$(just fedora_version '{{ image }}' '{{ tag }}' '{{ flavor }}' '{{ kernel_pin }}')

# Verify Base Image with cosign
just verify-container "${base_image_name}-main:${fedora_version}"
Expand Down Expand Up @@ -705,7 +705,7 @@ secureboot image="bluefin" tag="latest" flavor="main":
# Get Fedora Version of an image
[group('Utility')]
[private]
fedora_version image="bluefin" tag="latest" flavor="main":
fedora_version image="bluefin" tag="latest" flavor="main" $kernel_pin="":
#!/usr/bin/bash
set -eou pipefail
just validate {{ image }} {{ tag }} {{ flavor }}
Expand All @@ -718,6 +718,9 @@ fedora_version image="bluefin" tag="latest" flavor="main":
fi
fi
fedora_version=$(jq -r '.Labels["ostree.linux"]' < /tmp/manifest.json | grep -oP 'fc\K[0-9]+')
if [[ -n "${kernel_pin:-}" ]]; then
fedora_version=$(echo "${kernel_pin}" | grep -oP 'fc\K[0-9]+')
fi
echo "${fedora_version}"

# Image Name
Expand All @@ -736,7 +739,7 @@ image_name image="bluefin" tag="latest" flavor="main":

# Generate Tags
[group('Utility')]
generate-build-tags image="bluefin" tag="latest" flavor="main" ghcr="0" version="" github_event="" github_number="":
generate-build-tags image="bluefin" tag="latest" flavor="main" kernel_pin="" ghcr="0" version="" github_event="" github_number="":
#!/usr/bin/bash
set -eou pipefail

Expand All @@ -745,7 +748,7 @@ generate-build-tags image="bluefin" tag="latest" flavor="main" ghcr="0" version=
if [[ {{ ghcr }} == "0" ]]; then
rm -f /tmp/manifest.json
fi
FEDORA_VERSION="$(just fedora_version {{ image }} {{ tag }} {{ flavor }})"
FEDORA_VERSION="$(just fedora_version '{{ image }}' '{{ tag }}' '{{ flavor }}' '{{ kernel_pin }}')"
DEFAULT_TAG=$(just generate-default-tag {{ tag }} {{ ghcr }})
IMAGE_NAME=$(just image_name {{ image }} {{ tag }} {{ flavor }})
# Use Build Version from Rechunk
Expand Down

0 comments on commit f1302c8

Please sign in to comment.