Skip to content

Commit e60e9a7

Browse files
committed
Add missing OperatingSystemName to AMI tests
Signed-off-by: Francesco De Martino <[email protected]>
1 parent 48376df commit e60e9a7

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,30 @@ phases:
1515
NVSWITCHES=$(lspci -d 10de:1af1 | wc -l)
1616
echo "${NVSWITCHES}"
1717
18+
- name: OperatingSystemName
19+
action: ExecuteBash
20+
inputs:
21+
commands:
22+
- |
23+
set -v
24+
FILE=/etc/os-release
25+
if [ -e ${FILE} ]; then
26+
. ${FILE}
27+
RELEASE="${ID}${VERSION_ID:+.${VERSION_ID}}"
28+
fi
29+
30+
if [ $(echo "${RELEASE}" | grep -w '^amzn\.2') ]; then
31+
OS='alinux2'
32+
elif [ $(echo "${RELEASE}" | grep '^centos\.7') ]; then
33+
OS='centos7'
34+
elif [ $(echo "${RELEASE}" | grep '^ubuntu\.18') ]; then
35+
OS='ubuntu1804'
36+
elif [ $(echo "${RELEASE}" | grep '^ubuntu\.20') ]; then
37+
OS='ubuntu2004'
38+
fi
39+
40+
echo ${OS}
41+
1842
### tests ###
1943
- name: FabricManager
2044
action: ExecuteBash

0 commit comments

Comments
 (0)