Add collect_info.sh stage
Collect info about installed packages versions and pip packages into /etc/image_info folder Change-Id: I781457ceeb821a0cad7edc9c0921736b989e9ec7
This commit is contained in:
committed by
Andrii Ostapenko
parent
938a110f30
commit
ec429cb082
26
scripts/collect_info.sh
Executable file
26
scripts/collect_info.sh
Executable file
@@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
INFO_DIR="/etc/image_info"
|
||||||
|
mkdir -p $INFO_DIR
|
||||||
|
PACKAGES_INFO="${INFO_DIR}/packages.txt"
|
||||||
|
PIP_INFO="${INFO_DIR}/pip.txt"
|
||||||
|
|
||||||
|
case ${distro} in
|
||||||
|
debian|ubuntu)
|
||||||
|
dpkg -l > $PACKAGES_INFO
|
||||||
|
;;
|
||||||
|
centos)
|
||||||
|
yum list installed > $PACKAGES_INFO
|
||||||
|
;;
|
||||||
|
opensuse|opensuse-leap|opensuse-tumbleweed|sles)
|
||||||
|
zypper se --installed-only > $PACKAGES_INFO
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unknown distro: ${distro}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
pip freeze > $PIP_INFO
|
||||||
@@ -97,4 +97,5 @@ fi
|
|||||||
$(dirname $0)/clone_project.sh
|
$(dirname $0)/clone_project.sh
|
||||||
$(dirname $0)/install_packages.sh
|
$(dirname $0)/install_packages.sh
|
||||||
$(dirname $0)/pip_install.sh /tmp/${PROJECT} ${PIP_PACKAGES}
|
$(dirname $0)/pip_install.sh /tmp/${PROJECT} ${PIP_PACKAGES}
|
||||||
|
$(dirname $0)/collect_info.sh
|
||||||
$(dirname $0)/cleanup.sh
|
$(dirname $0)/cleanup.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user