Skip to content

Commit f554851

Browse files
hgreebehanwen-cluster
authored andcommitted
Add minor pin to second stage build
1 parent f60a7cd commit f554851

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

cli/src/pcluster/resources/imagebuilder/parallelcluster.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,21 @@ phases:
105105
106106
echo ${!OS}
107107
108+
- name: OperatingSystemVersion
109+
action: ExecuteBash
110+
inputs:
111+
commands:
112+
- |
113+
set -v
114+
FILE=/etc/os-release
115+
if [ -e ${!FILE} ]; then
116+
. ${!FILE}
117+
echo "${!VERSION_ID}"
118+
else
119+
echo "The file '${!FILE}' does not exist. Failing build."
120+
exit {{ FailExitCode }}
121+
fi
122+
108123
# Get platform name
109124
- name: PlatformName
110125
action: ExecuteBash
@@ -176,9 +191,16 @@ phases:
176191
set -v
177192
OS='{{ build.OperatingSystemName.outputs.stdout }}'
178193
PLATFORM='{{ build.PlatformName.outputs.stdout }}'
194+
VERSION='{{ build.OperatingSystemVersion.outputs.stdout }}'
179195
180196
if [[ ${!PLATFORM} == RHEL ]]; then
197+
if [[ ${!OS} == rhel9 ]]; then
198+
echo ${!VERSION} > /etc/yum/vars/releasever
199+
yum clean all
200+
fi
201+
yum -y update krb5-libs
181202
yum -y groupinstall development && sudo yum -y install curl wget jq
203+
182204
183205
if [[ ${!OS} =~ ^centos ]]; then
184206
/bin/sed -r -i -e 's/SELINUX=enforcing/SELINUX=permissive/' /etc/selinux/config

0 commit comments

Comments
 (0)