Skip to content

Commit ccacb26

Browse files
Himani Anil Deshpandehimani2411
authored andcommitted
[GH System tests] Skip the Downgrade Docker so that we are aware of when to revert the workaround
* Downgrade only if Docker is v29.x
1 parent 6714905 commit ccacb26

1 file changed

Lines changed: 21 additions & 14 deletions

File tree

.github/workflows/dokken-system-tests.yml

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -80,24 +80,31 @@ jobs:
8080
omnitruckUrl: omnitruck.cinc.sh
8181
project: cinc-workstation
8282
- name: Downgrade Docker for kitchen-dokken 2.20.8 compatibility
83-
if: steps.changed-files-excluding-tests.outputs.any_changed == 'true' && needs.check-labels.outputs.skip_system_tests != 'true'
83+
if: steps.changed-files-excluding-tests.outputs.any_changed == 'true' && needs.check-labels.outputs.skip_system_tests != 'true' && !startsWith(matrix.os, 'alinux')
8484
run: |
8585
# kitchen-dokken 2.20.8 sends Cmd as string and platform as "os/arch" string
8686
# Docker 29.x (rolled out Feb 9 2026) rejects these — downgrade to 28.x
8787
# https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20260201.15
88-
echo "Current Docker: $(docker --version)"
89-
# Ensure Docker official repo is configured
90-
sudo install -m 0755 -d /etc/apt/keyrings
91-
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
92-
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
93-
sudo apt-get update
94-
# List available versions for debugging
95-
apt-cache madison docker-ce | head -20
96-
# Find latest 28.x version (format is 5:28.x.y-1~ubuntu...)
97-
VERSION_STRING=$(apt-cache madison docker-ce | awk -F'|' '{print $2}' | tr -d ' ' | grep '^5:28\.' | head -1)
98-
echo "Installing Docker version: $VERSION_STRING"
99-
sudo apt-get install -y --allow-downgrades docker-ce=$VERSION_STRING docker-ce-cli=$VERSION_STRING
100-
echo "New Docker: $(docker --version)"
88+
DOCKER_VERSION=$(docker version --format '{{.Server.Version}}')
89+
echo "Current Docker: $DOCKER_VERSION"
90+
DOCKER_MAJOR=$(echo "$DOCKER_VERSION" | cut -d. -f1)
91+
if [[ "$DOCKER_MAJOR" -ge 29 ]]; then
92+
echo "Docker ${DOCKER_VERSION} (major >= 29) detected — downgrading to 28.x"
93+
# Ensure Docker official repo is configured
94+
sudo install -m 0755 -d /etc/apt/keyrings
95+
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
96+
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
97+
sudo apt-get update
98+
# List available versions for debugging
99+
apt-cache madison docker-ce | head -20
100+
# Find latest 28.x version (format is 5:28.x.y-1~ubuntu...)
101+
VERSION_STRING=$(apt-cache madison docker-ce | awk -F'|' '{print $2}' | tr -d ' ' | grep '^5:28\.' | head -1)
102+
echo "Installing Docker version: $VERSION_STRING"
103+
sudo apt-get install -y --allow-downgrades docker-ce=$VERSION_STRING docker-ce-cli=$VERSION_STRING
104+
echo "New Docker: $(docker --version)"
105+
else
106+
echo "Docker version is not 29.x — skipping downgrade"
107+
fi
101108
- name: Kitchen Test Install
102109
if: steps.changed-files-excluding-tests.outputs.any_changed == 'true' && needs.check-labels.outputs.skip_system_tests != 'true'
103110
uses: actionshub/test-kitchen@main

0 commit comments

Comments
 (0)