Skip to content

Commit

Permalink
Lock kernel minor version during image build
Browse files Browse the repository at this point in the history
  • Loading branch information
hgreebe committed Dec 13, 2024
1 parent 123590a commit 0c5d30d
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions cli/src/pcluster/resources/imagebuilder/update_and_reboot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,21 @@ phases:
fi
echo ${!OS}
- name: OperatingSystemVersion
action: ExecuteBash
inputs:
commands:
- |
set -v
FILE=/etc/os-release
if [ -e ${!FILE} ]; then
. ${!FILE}
echo "${!VERSION_ID}"
else
echo "The file '${!FILE}' does not exist. Failing build."
exit {{ FailExitCode }}
fi
# Get platform name
- name: PlatformName
Expand Down Expand Up @@ -151,6 +166,11 @@ phases:
set -v
OS='{{ build.OperatingSystemName.outputs.stdout }}'
PLATFORM='{{ build.PlatformName.outputs.stdout }}'
VERSION='{{ build.OperatingSystemVersion.outputs.stdout }}'
if [[ ${!OS} == rhel9 ]]; then
echo ${!VERSION} > /etc/yum/vars/releasever
yum clean all
fi
if [[ ${!PLATFORM} == RHEL ]]; then
yum -y install jq
Expand Down

0 comments on commit 0c5d30d

Please sign in to comment.