Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: enable kernel_pin and pin kernel for stable/gts #1921

Merged
merged 4 commits into from
Nov 12, 2024
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
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
Loading