-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
github-actions
committed
Dec 5, 2024
1 parent
38988b1
commit 169c368
Showing
9 changed files
with
3,405 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
27.3.1.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
--- 27.3.0.orig.sh 2024-12-05 17:08:08.822191489 +0000 | ||
+++ 27.3.0.sh 2024-12-05 17:08:08.850191406 +0000 | ||
@@ -82,26 +82,34 @@ | ||
# the script was uploaded (Should only be modified by upload job): | ||
SCRIPT_COMMIT_SHA="711a0d41213afabc30b963f82c56e1442a3efe1c" | ||
|
||
-# strip "v" prefix if present | ||
-VERSION="${VERSION#v}" | ||
+CHANNEL="stable" | ||
+DOWNLOAD_URL="https://download.docker.com" | ||
+REPO_FILE="docker-ce.repo" | ||
+VERSION="27.3.0" | ||
+DIND_TEST_WAIT=${DIND_TEST_WAIT:-3s} # Wait time until docker start at dind test env | ||
+ | ||
+# Issue https://github.com/rancher/rancher/issues/29246 | ||
+adjust_repo_releasever() { | ||
+ DOWNLOAD_URL="https://download.docker.com" | ||
+ case $1 in | ||
+ 8*) | ||
+ releasever=8 | ||
+ ;; | ||
+ 9*) | ||
+ releasever=9 | ||
+ ;; | ||
+ *) | ||
+ # fedora, or unsupported | ||
+ return | ||
+ ;; | ||
+ esac | ||
|
||
-# The channel to install from: | ||
-# * stable | ||
-# * test | ||
-DEFAULT_CHANNEL_VALUE="stable" | ||
-if [ -z "$CHANNEL" ]; then | ||
- CHANNEL=$DEFAULT_CHANNEL_VALUE | ||
-fi | ||
- | ||
-DEFAULT_DOWNLOAD_URL="https://download.docker.com" | ||
-if [ -z "$DOWNLOAD_URL" ]; then | ||
- DOWNLOAD_URL=$DEFAULT_DOWNLOAD_URL | ||
-fi | ||
- | ||
-DEFAULT_REPO_FILE="docker-ce.repo" | ||
-if [ -z "$REPO_FILE" ]; then | ||
- REPO_FILE="$DEFAULT_REPO_FILE" | ||
-fi | ||
+ for channel in "stable" "test" "nightly"; do | ||
+ $sh_c "$config_manager --setopt=docker-ce-${channel}.baseurl=${DOWNLOAD_URL}/linux/rhel/${releasever}/\\\$basearch/${channel} --save"; | ||
+ $sh_c "$config_manager --setopt=docker-ce-${channel}-debuginfo.baseurl=${DOWNLOAD_URL}/linux/rhel/${releasever}/debug-\\\$basearch/${channel} --save"; | ||
+ $sh_c "$config_manager --setopt=docker-ce-${channel}-source.baseurl=${DOWNLOAD_URL}/linux/rhel/${releasever}/source/${channel} --save"; | ||
+ done | ||
+} | ||
|
||
mirror='' | ||
DRY_RUN=${DRY_RUN:-} | ||
@@ -153,6 +161,19 @@ | ||
;; | ||
esac | ||
|
||
+start_docker() { | ||
+ if [ ! -z $DIND_TEST ]; then | ||
+ # Starting dockerd manually due to dind env is not using systemd | ||
+ dockerd & | ||
+ sleep $DIND_TEST_WAIT | ||
+ elif [ -d '/run/systemd/system' ] ; then | ||
+ $sh_c 'systemctl start docker' | ||
+ else | ||
+ $sh_c 'service docker start' | ||
+ fi | ||
+} | ||
+ | ||
+ | ||
command_exists() { | ||
command -v "$@" > /dev/null 2>&1 | ||
} | ||
@@ -444,10 +465,17 @@ | ||
esac | ||
;; | ||
|
||
- centos|rhel) | ||
+ centos|rhel|sles|rocky) | ||
if [ -z "$dist_version" ] && [ -r /etc/os-release ]; then | ||
dist_version="$(. /etc/os-release && echo "$VERSION_ID")" | ||
fi | ||
+ | ||
+ ;; | ||
+ | ||
+ oracleserver|ol) | ||
+ lsb_dist="ol" | ||
+ # need to switch lsb_dist to match yum repo URL | ||
+ dist_version="$(rpm -q --whatprovides redhat-release --queryformat "%{VERSION}\n" | sed 's/\/.*//' | sed 's/\..*//' | sed 's/Server*//')" | ||
;; | ||
|
||
*) | ||
@@ -547,12 +575,16 @@ | ||
set -x | ||
fi | ||
$sh_c "DEBIAN_FRONTEND=noninteractive apt-get -y -qq install $pkgs >/dev/null" | ||
+ start_docker | ||
) | ||
echo_docker_as_nonroot | ||
exit 0 | ||
;; | ||
- centos|fedora|rhel) | ||
+ centos|fedora|rhel|ol|rocky) | ||
repo_file_url="$DOWNLOAD_URL/linux/$lsb_dist/$REPO_FILE" | ||
+ if [ "$lsb_dist" = "ol" ] || [ "$lsb_dist" = "rocky" ] || [ "$lsb_dist" = "rhel" ]; then | ||
+ repo_file_url="$DOWNLOAD_URL/linux/rhel/$REPO_FILE" | ||
+ fi | ||
( | ||
if ! is_dry_run; then | ||
set -x | ||
@@ -652,6 +684,11 @@ | ||
echo "Packages for SLES are currently only available for s390x" | ||
exit 1 | ||
fi | ||
+ if [ "$dist_version" = "15.3" ]; then | ||
+ sles_version="SLE_15_SP3" | ||
+ else | ||
+ sles_version="SLE_15_SP2" | ||
+ fi | ||
repo_file_url="$DOWNLOAD_URL/linux/$lsb_dist/$REPO_FILE" | ||
pre_reqs="ca-certificates curl libseccomp2 awk" | ||
( | ||
@@ -716,10 +753,25 @@ | ||
set -x | ||
fi | ||
$sh_c "zypper -q install -y $pkgs" | ||
+ if ! command_exists iptables; then | ||
+ $sh_c "$pkg_manager install -y -q iptables" | ||
+ fi | ||
+ start_docker | ||
) | ||
echo_docker_as_nonroot | ||
exit 0 | ||
;; | ||
+ rancheros) | ||
+ ( | ||
+ set -x | ||
+ $sh_c "sleep 3;ros engine list --update" | ||
+ engine_version="$(sudo ros engine list | awk '{print $2}' | grep ${docker_version} | tail -n 1)" | ||
+ if [ "$engine_version" != "" ]; then | ||
+ $sh_c "ros engine switch -f $engine_version" | ||
+ fi | ||
+ ) | ||
+ exit 0 | ||
+ ;; | ||
*) | ||
if [ -z "$lsb_dist" ]; then | ||
if is_darwin; then |
Oops, something went wrong.