mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
ci: use package-manager dependency install scripts
Currently, adding a package which is required either for development or testing requires it to be added in multiple places due to many duplicated Dockerfiles and installation scripts. This makes it difficult to ensure that all scripts are updated appropriately and can lead to some places being missed. This patch consolidates the list of dependencies and adds installation scripts for each package-manager used in our CI (apk, apt, dnf, pacman). This change also replaces the `debian/dev-packages.lst` as this subfolder conflicts with the Ubuntu/Debian packing scripts used for CRIU: https://github.com/rst0git/criu-deb-packages This patch also removes the CentOS 8 build scripts as it is EOL and the container registry is no longer available. Signed-off-by: Shashank Balaji <shashank.mahadasyam@sony.com> Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
This commit is contained in:
parent
67751bc11b
commit
25f8be0f60
35 changed files with 295 additions and 459 deletions
23
contrib/apt-install
Executable file
23
contrib/apt-install
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e -x
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
install_retry_counter=0
|
||||
max_apt_retries=5
|
||||
|
||||
# This function loops a couple of times over apt-get, hoping to
|
||||
# avoid CI errors due to errors during apt-get
|
||||
# hashsum mismatches, DNS errors and similar things
|
||||
while true; do
|
||||
(( install_retry_counter+=1 ))
|
||||
if [ "${install_retry_counter}" -gt "${max_apt_retries}" ]; then
|
||||
exit 1
|
||||
fi
|
||||
apt-get update -y && apt-get install -y --no-install-recommends "$@" && break
|
||||
|
||||
# In case it is a network error let's wait a bit.
|
||||
echo "Retrying attempt ${install_retry_counter}"
|
||||
sleep "${install_retry_counter}"
|
||||
done
|
||||
Loading…
Add table
Add a link
Reference in a new issue