diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cd1a698..db5ab50 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,12 +1,14 @@ ############ # Settings # ############ -image: docker:24.0.6 +image: docker:28.2.2 services: - - docker:24.0.6-dind + - docker:28.2.2-dind stages: - template - run +default: + retry: 2 variables: BASE_TAG: "1.16.1-rolling-daily" USE_PRIVATE_IMAGES: 0 diff --git a/ci-scripts/docker-install.sh b/ci-scripts/docker-install.sh new file mode 100644 index 0000000..905b0b4 --- /dev/null +++ b/ci-scripts/docker-install.sh @@ -0,0 +1,133 @@ +#!/bin/bash + +function install_centos (){ + echo "CentOS 7.x/8.x/9.x Install" + echo "Installing Base CentOS Packages" + + NO_BEST="" + if [ "${1}" == '"8"' ] || [ "${1}" == '"9"' ]; then + NO_BEST="--nobest" + fi + + yum install -y yum-utils \ + device-mapper-persistent-data \ + lvm2 \ + lsof \ + nc + + yum-config-manager \ + --add-repo \ + https://download.docker.com/linux/centos/docker-ce.repo + + echo "Installing Docker-CE" + yum install -y docker-ce docker-compose-plugin $NO_BEST + systemctl start docker +} + + +function install_ubuntu (){ + echo "Ubuntu 18.04/20.04/22.04/24.04 Install" + echo "Installing Base Ubuntu Packages" + apt-get update + apt-get install -y \ + apt-transport-https \ + ca-certificates \ + curl \ + netcat-openbsd \ + software-properties-common + + if dpkg -s docker-ce | grep Status: | grep installed ; then + echo "Docker Installed" + else + echo "Installing Docker-CE" + + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - + add-apt-repository -y "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" + apt-get update + apt-get -y install docker-ce docker-compose-plugin + fi +} + +function install_debian (){ + echo "Debian 10.x/11.x/12.x Install" + echo "Installing Base Debian Packages" + apt-get update + apt-get install -y \ + apt-transport-https \ + ca-certificates \ + curl \ + gnupg2 \ + netcat-openbsd \ + software-properties-common + + if dpkg -s docker-ce | grep Status: | grep installed ; then + echo "Docker Installed" + else + echo "Installing Docker-CE" + + curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - + mkdir -p /etc/apt/sources.list.d + echo "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/debian $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list + apt-get update + apt-get -y install docker-ce docker-compose-plugin + fi +} + +function install_oracle (){ + echo "RHEL Linux 7.x/8.x/9.x Install" + echo "Installing Base Packages" + + NO_BEST="" + if [[ "${1}" == '"8.'* ]] || [[ "${1}" == '"9.'* ]]; then + NO_BEST="--nobest" + else + yum-config-manager --enable ol7_developer + fi + + yum install -y yum-utils \ + device-mapper-persistent-data \ + lvm2 \ + lsof \ + nc + + yum-config-manager \ + --add-repo \ + https://download.docker.com/linux/centos/docker-ce.repo + + echo "Installing Docker-CE" + yum install -y docker-ce docker-compose-plugin $NO_BEST + systemctl start docker +} + +if [ -f /etc/os-release ] ; then + OS_ID="$(awk -F= '/^ID=/{print $2}' /etc/os-release)" + OS_VERSION_ID="$(awk -F= '/^VERSION_ID/{print $2}' /etc/os-release)" +fi + +case $OS_ID in + "ubuntu") + install_ubuntu + ;; + "debian") + install_debian + ;; + "centos") + install_centos ${OS_VERSION_ID} + ;; + "ol") + install_oracle ${OS_VERSION_ID} + ;; + "rocky") + install_oracle ${OS_VERSION_ID} + ;; + "almalinux") + install_oracle ${OS_VERSION_ID} + ;; + "rhel") + install_oracle ${OS_VERSION_ID} + ;; + *) + echo "OS not supported" + exit 1 + ;; +esac \ No newline at end of file diff --git a/ci-scripts/gitlab-ci.template b/ci-scripts/gitlab-ci.template index 1ae170b..e898711 100644 --- a/ci-scripts/gitlab-ci.template +++ b/ci-scripts/gitlab-ci.template @@ -1,15 +1,17 @@ ############ # Settings # ############ -image: docker:24.0.6 +image: docker:28.2.2 services: - - docker:24.0.6-dind + - docker:28.2.2-dind stages: - readme - revert - build - test - manifest +default: + retry: 2 variables: BASE_TAG: "{{ BASE_TAG }}" USE_PRIVATE_IMAGES: {{ USE_PRIVATE_IMAGES }} diff --git a/ci-scripts/test.sh b/ci-scripts/test.sh index 54c27b1..5cf28cd 100755 --- a/ci-scripts/test.sh +++ b/ci-scripts/test.sh @@ -169,12 +169,13 @@ for IP in "${IPS[@]}"; do scp \ -oStrictHostKeyChecking=no \ /root/.docker/config.json \ + ci-scripts/docker-install.sh \ ${USER}@${IP}:/tmp/ ssh \ -oConnectTimeout=10 \ -oStrictHostKeyChecking=no \ ${USER}@${IP} \ - "sudo mkdir -p /root/.docker && sudo mv /tmp/config.json /root/.docker/ && sudo chown root:root /root/.docker/config.json" + "sudo mkdir -p /root/.docker && sudo mv /tmp/config.json /root/.docker/ && sudo chown root:root /root/.docker/config.json && sudo bash /tmp/docker-install.sh" done # Install Kasm workspaces diff --git a/src/oracle/install/tools/install_tools_deluxe.sh b/src/oracle/install/tools/install_tools_deluxe.sh index 6379400..a2e6beb 100644 --- a/src/oracle/install/tools/install_tools_deluxe.sh +++ b/src/oracle/install/tools/install_tools_deluxe.sh @@ -2,7 +2,7 @@ set -ex if [ -f /usr/bin/dnf ]; then - dnf install -y vlc git tmux xz glibc-locale-source glibc-langpack-en + dnf install -y --nobest vlc git tmux xz glibc-locale-source glibc-langpack-en if [ -z ${SKIP_CLEAN+x} ]; then dnf clean all fi