Loading .gitlab-ci.yml +32 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,38 @@ sync-tbc: fi } - install_ca_certs "${CUSTOM_CA_CERTS:-$DEFAULT_CA_CERTS}" - apk add --update --no-cache git curl jq bash - | function maybe_install_pkg() { pkg_name="$1" cmd_name="${2:-$pkg_name}" if ! command -v "$cmd_name" > /dev/null then echo "[INFO] $pkg_name not found: install..." if command -v apt-get > /dev/null then apt-get install -yq "$pkg_name" elif command -v apk > /dev/null then apk add --no-cache "$pkg_name" elif command -v yum > /dev/null then yum install -yq "$pkg_name" elif command -v dnf > /dev/null then dnf install -yq "$pkg_name" elif command -v zypper > /dev/null then zypper -nq install "$pkg_name" else echo "[ERROR] ... didn't find any known package manager to install $pkg_name!" exit 1 fi fi } - maybe_install_pkg git - maybe_install_pkg curl - maybe_install_pkg jq - maybe_install_pkg bash # done twice because /etc/ssl/certs/ca-certificates.crt is altered during apk add # we can't use update-ca-certificates --fresh because $CUSTOM_CA_CERTS can contains several certificates - install_ca_certs "${CUSTOM_CA_CERTS:-$DEFAULT_CA_CERTS}" Loading Loading
.gitlab-ci.yml +32 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,38 @@ sync-tbc: fi } - install_ca_certs "${CUSTOM_CA_CERTS:-$DEFAULT_CA_CERTS}" - apk add --update --no-cache git curl jq bash - | function maybe_install_pkg() { pkg_name="$1" cmd_name="${2:-$pkg_name}" if ! command -v "$cmd_name" > /dev/null then echo "[INFO] $pkg_name not found: install..." if command -v apt-get > /dev/null then apt-get install -yq "$pkg_name" elif command -v apk > /dev/null then apk add --no-cache "$pkg_name" elif command -v yum > /dev/null then yum install -yq "$pkg_name" elif command -v dnf > /dev/null then dnf install -yq "$pkg_name" elif command -v zypper > /dev/null then zypper -nq install "$pkg_name" else echo "[ERROR] ... didn't find any known package manager to install $pkg_name!" exit 1 fi fi } - maybe_install_pkg git - maybe_install_pkg curl - maybe_install_pkg jq - maybe_install_pkg bash # done twice because /etc/ssl/certs/ca-certificates.crt is altered during apk add # we can't use update-ca-certificates --fresh because $CUSTOM_CA_CERTS can contains several certificates - install_ca_certs "${CUSTOM_CA_CERTS:-$DEFAULT_CA_CERTS}" Loading