[arvados-dev] updated: fb2bb48b6bcf4884d016ec4ce5d87363d51c6ebe
git repository hosting
git at public.arvados.org
Fri Apr 19 20:12:15 UTC 2024
Summary of changes:
jenkins/packer-images/jenkins-image-common.sh | 48 ++++++++++++++-------------
1 file changed, 25 insertions(+), 23 deletions(-)
via fb2bb48b6bcf4884d016ec4ce5d87363d51c6ebe (commit)
from f3e97f6cba1ef643c126f1d73f5d2d9d956ea62a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit fb2bb48b6bcf4884d016ec4ce5d87363d51c6ebe
Author: Brett Smith <brett.smith at curii.com>
Date: Fri Apr 19 16:06:05 2024 -0400
21662: Refine distro detection in jenkins-image-common
* Use ID_LIKE to identify distros rather than having whole lists.
* Only install buster-backports when we're actually on buster.
Refs #21662.
Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith at curii.com>
diff --git a/jenkins/packer-images/jenkins-image-common.sh b/jenkins/packer-images/jenkins-image-common.sh
index e68b092..9f3c461 100755
--- a/jenkins/packer-images/jenkins-image-common.sh
+++ b/jenkins/packer-images/jenkins-image-common.sh
@@ -11,29 +11,31 @@ sudo su -c "echo ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCfRJenfxGPFuJ/W2KUs6Wf0wa
sudo su -c "echo ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDH8swFWEfEfHhA+C5ezV8SXO/PkzGD1SH5VAQP/XDIrtnUocBZ3CE30lSyqYJI/EVKVqVa/ICQ0YpUwiMK6+3Jr9QQJwVyTmPji2nY3InL+1XAucN6HFJGKY9bYSsNOuKooj22GwBWw3gfJNLg/8qtpVykEq1yRpyh6pGsXT+J5nUZ723vZZTh//sxdN4CM8D8zoDgHc4RbL+zvESnCDrDbtMhg2u1h14RWiFOBAnzYuWcgtVDy2HA9iS0hJFB2UOV50byXLrEetxJ84PTwRsV2irq1y63g58VxwYOUrVZ08MY5qFvHExBjPqeqhRMzE7GufWM5F1CcUuGviOGFWfqMnfG4VOirPkFtRoK2oKRxH+NVPoUXWWxItJQ1dZ9hLDDWgAbxAvLS4Nnl2hvOVAbC7RVpXfoAhIPpL48oS1UprbsZIMxk2ZmRSJB1ykD3aLUvoO4zoD6xADt8uLiPvVYgFWUy1doLxHZqdY1Omc91owgQVPKvQ4vhqsJehQl4ZDS+O+8S7aC5m8sQ/V+NqiiXLH22vN58K7qNrkHWdb1n+rhilMbA5zp3cSKBgwmmNdupyPkJOKvf3IS7i4El+c8RFmRQv4FzGrdjGXAP8LPtt1dWPgHTFYjmrkOHLmfWM/y8cuyPWW/HEp3Y/msPQRlS3Gymce//vAWgN4T9yN46w== lucas at notebook" >> /home/jenkins/.ssh/authorized_keys
# Install a few dependency packages
-# First, let's figure out the OS we're working on
-OS_ID=$(grep ^ID= /etc/os-release |cut -f 2 -d \" | cut -f 2 -d = )
-echo "Detected distro: ${OS_ID}"
-
-case ${OS_ID} in
- centos)
- PREINSTALL_CMD="/bin/true"
- INSTALL_CMD="yum install -y"
- POSTINSTALL_CMD="/bin/true"
- PKGS="git nmap-ncat java-11-openjdk"
- ;;
- debian|ubuntu)
- if [ ${OS_ID} = "debian" ]; then
- echo "deb http://deb.debian.org/debian buster-backports main" | sudo tee /etc/apt/sources.list.d/buster-backports.list
- fi
- PREINSTALL_CMD="DEBIAN_FRONTEND=noninteractive apt-get update"
- INSTALL_CMD="DEBIAN_FRONTEND=noninteractive apt-get install -y"
- POSTINSTALL_CMD="DEBIAN_FRONTEND=noninteractive apt-get purge --autoremove -y"
- # SUFFIX packages with - to remove them
- # Remove unattended-upgrades so that it doesn't interfere with our nodes at startup
- PKGS="git netcat-traditional default-jdk unattended-upgrades-"
- ;;
-esac
+. /etc/os-release
+PREINSTALL_CMD='echo "error: unknown distro" >&2; false'
+for OS_ID in ${ID:-} ${ID_LIKE:-}; do
+ case ${OS_ID} in
+ rhel)
+ PREINSTALL_CMD="/bin/true"
+ INSTALL_CMD="yum install -y"
+ POSTINSTALL_CMD="/bin/true"
+ PKGS="git nmap-ncat java-11-openjdk"
+ break
+ ;;
+ debian)
+ if [[ "$VERSION_CODENAME" == buster ]]; then
+ echo "deb http://deb.debian.org/debian buster-backports main" | sudo tee /etc/apt/sources.list.d/buster-backports.list
+ fi
+ PREINSTALL_CMD="DEBIAN_FRONTEND=noninteractive apt-get update"
+ INSTALL_CMD="DEBIAN_FRONTEND=noninteractive apt-get install -y"
+ POSTINSTALL_CMD="DEBIAN_FRONTEND=noninteractive apt-get purge --autoremove -y"
+ # SUFFIX packages with - to remove them
+ # Remove unattended-upgrades so that it doesn't interfere with our nodes at startup
+ PKGS="git netcat-traditional default-jdk unattended-upgrades-"
+ break
+ ;;
+ esac
+done
sudo su -c "${PREINSTALL_CMD}"
sudo su -c "${INSTALL_CMD} ${PKGS}"
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list