Skip to content

Commit feb8b78

Browse files
committed
Update customize-ami to be up to date
Important update is moving to Java 17 where ever it is available Signed-off-by: Brian Barrett <bbarrett@amazon.com>
1 parent 84eec17 commit feb8b78

File tree

1 file changed

+33
-13
lines changed

1 file changed

+33
-13
lines changed

jenkins/customize-ami.sh

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,19 @@ case $PLATFORM_ID in
7474
# differentiation.
7575
sudo yum -y update
7676
sudo yum -y group install "Development Tools"
77-
sudo yum -y install libevent hwloc hwloc-libs java gdb
77+
sudo yum -y install libevent hwloc hwloc-libs gdb
7878
labels="${labels} linux rhel ${VERSION_ID}"
7979
case $VERSION_ID in
8080
7.*)
81-
sudo yum -y install gcc gcc-c++ gcc-gfortran
81+
sudo yum -y install gcc gcc-c++ gcc-gfortran \
82+
java-11-openjdk-headless
8283
labels="${labels} gcc48"
8384
;;
8485
8.*)
8586
sudo yum -y install python3.8 \
86-
gcc gcc-c++ gcc-gfortran
87+
gcc gcc-c++ gcc-gfortran \
88+
java-17-openjdk-headless
89+
sudo yum -y remove java-1.8.0-openjdk-headless
8790
sudo alternatives --set python /usr/bin/python3
8891
sudo pip3 install sphinx recommonmark docutils sphinx-rtd-theme
8992
labels="${labels} gcc8"
@@ -108,16 +111,15 @@ case $PLATFORM_ID in
108111
echo "==> Installing packages"
109112
sudo yum -y update
110113
sudo yum -y groupinstall "Development Tools"
111-
sudo yum -y install libevent-devel hwloc-devel \
112-
java-1.8.0-openjdk-devel java-1.8.0-openjdk \
113-
gdb python3-pip
114114
labels="${labels} linux"
115115
case $VERSION_ID in
116116
2)
117117
sudo yum -y install clang hwloc-devel \
118-
python2-pip python2 python2-boto3 python3-pip python3
119-
sudo pip install mock
120-
sudo pip3 install sphinx recommonmark docutils sphinx-rtd-theme
118+
python2-pip python2 python2-boto3 python3-pip python3 \
119+
java-17-amazon-corretto-headless libevent-devel hwloc-devel \
120+
hwloc gdb python3-pip python3-devel
121+
sudo pip install mock
122+
sudo pip3 install sphinx recommonmark docutils sphinx-rtd-theme
121123
labels="${labels} amazon_linux_2-${arch} gcc7 clang7"
122124
;;
123125
*)
@@ -135,13 +137,14 @@ case $PLATFORM_ID in
135137
sudo apt-get -y upgrade
136138
sudo apt-get -y install build-essential gfortran \
137139
autoconf automake libtool flex hwloc libhwloc-dev git \
138-
default-jre awscli python-mock rman pandoc
140+
default-jre awscli rman pandoc
139141
pandoc_installed=1
140142
labels="${labels} linux ubuntu_${VERSION_ID}-${arch}"
141143
case $VERSION_ID in
142144
18.04)
143145
sudo apt-get -y install \
144146
python-boto3 python-pip \
147+
python-mock \
145148
gcc-4.8 g++-4.8 gfortran-4.8 \
146149
gcc-5 g++-5 gfortran-5 \
147150
gcc-6 g++-6 gfortran-6 \
@@ -173,6 +176,23 @@ case $PLATFORM_ID in
173176
labels="${labels} 32bit_builds"
174177
fi
175178
;;
179+
22.04)
180+
sudo apt-get -y install \
181+
python-is-python3 python3-boto3 python3-mock \
182+
python3-pip \
183+
gcc-9 g++-9 gfortran-9 \
184+
gcc-10 g++-10 gfortran-10 \
185+
gcc-11 g++-11 gfortran-11 \
186+
gcc-12 g++-12 gfortran-12 \
187+
clang-11 clang-12 clang-13 clang-14 \
188+
clang-format-14 bsdutils
189+
sudo pip3 install sphinx recommonmark docutils sphinx-rtd-theme
190+
labels="${labels} gcc9 gcc10 gcc11 gcc12 clang11 clang13 clang14"
191+
if test "$arch" = "x86_64" ; then
192+
sudo apt-get -y install gcc-multilib g++-multilib gfortran-multilib
193+
labels="${labels} 32bit_builds"
194+
fi
195+
;;
176196
*)
177197
echo "ERROR: Unknown version ${PLATFORM_ID} ${VERSION_ID}"
178198
exit 1
@@ -214,7 +234,7 @@ case $PLATFORM_ID in
214234
else
215235
echo "--> Skipping sudoers update"
216236
fi
217-
sudo pkg install -y openjdk8 autoconf automake libtool gcc wget curl git hs-pandoc
237+
sudo pkg install -y openjdk17 autoconf automake libtool gcc wget curl git hs-pandoc
218238
pandoc_installed=1
219239
if ! grep -q '/dev/fd' /etc/fstab ; then
220240
echo "Adding /dev/fd entry to /etc/fstab"
@@ -230,8 +250,8 @@ case $PLATFORM_ID in
230250
exit 1
231251
esac
232252

233-
if [[ $pandoc_installed -eq 0 ]] ; then
234-
if [[ $arch == "x86_64" ]] ; then
253+
if test $pandoc_installed -eq 0 ; then
254+
if test $arch == "x86_64" ; then
235255
pandoc_url=${pandoc_x86_url}
236256
else
237257
pandoc_url=${pandoc_arm_url}

0 commit comments

Comments
 (0)