Add install-distro-packages.sh job script
This script will be used in coming jobs to install system dependencies with bindep. The logic is taken from the content of the install-distro-packages builder macro which it will subsequently replace. Change-Id: Iae56d343bb2a084d889aee47d97fcb2731786791
This commit is contained in:
parent
d4aca3e8a4
commit
691528482b
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash -xe
|
||||
|
||||
# figure out which bindep list to use
|
||||
if [ -e other-requirements.txt ] ; then
|
||||
# project has its own bindep list
|
||||
export DISTRO_PACKAGES=other-requirements.txt
|
||||
elif [ "$ZUUL_PROJECT" == "openstack-infra/project-config" ] ; then
|
||||
# test changes to the included fallback list in project-config jobs
|
||||
export DISTRO_PACKAGES=jenkins/data/bindep-fallback.txt
|
||||
else
|
||||
# use the bindep fallback list preinstalled on the worker
|
||||
export DISTRO_PACKAGES=/usr/local/jenkins/common_data/bindep-fallback.txt
|
||||
fi
|
||||
|
||||
# install all requested packages from the appropriate bindep list
|
||||
if apt-get -v >/dev/null ; then
|
||||
sudo apt-get update
|
||||
sudo PATH=/usr/sbin:/sbin:$PATH DEBIAN_FRONTEND=noninteractive \
|
||||
apt-get --option "Dpkg::Options::=--force-confold" \
|
||||
--assume-yes install \
|
||||
`/usr/bindep-env/bin/bindep -b -f $DISTRO_PACKAGES || true`
|
||||
else
|
||||
sudo PATH=/usr/sbin:/sbin:$PATH yum install -y \
|
||||
`/usr/bindep-env/bin/bindep -b -f $DISTRO_PACKAGES || true`
|
||||
fi
|
Loading…
Reference in New Issue