Skip to content

Commit 0d88ef0

Browse files
authored
Verify docker cli ce (#693)
* feat: add verification step for Docker CE installation in release workflow * fix: increase timeout for release workflow and add wait step for plugin completion
1 parent 6b7dfda commit 0d88ef0

File tree

2 files changed

+78
-16
lines changed

2 files changed

+78
-16
lines changed

.github/workflows/release.yml

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ jobs:
491491
if: ${{ !inputs.skipPackaging }}
492492
needs: [prepare, release-cli-desktop]
493493
runs-on: ubuntu-latest
494-
timeout-minutes: 120
494+
timeout-minutes: 360
495495
permissions:
496496
contents: read
497497
steps:
@@ -574,6 +574,40 @@ jobs:
574574
-f release_live=true
575575
echo "✅ Plugin release workflow triggered in docker/release-repo"
576576
577+
- name: Wait for release-repo plugin workflow to complete
578+
env:
579+
GH_TOKEN: ${{ secrets.CLI_RELEASE_PAT }}
580+
run: |
581+
echo "⏳ Waiting for release-repo plugin workflow to appear..."
582+
sleep 15
583+
584+
# Find the most recent run of plugin.yml in release-repo
585+
for i in $(seq 1 10); do
586+
RUN_ID=$(gh run list \
587+
--repo docker/release-repo \
588+
--workflow plugin.yml \
589+
--limit 1 \
590+
--json databaseId \
591+
--jq '.[0].databaseId')
592+
if [ -n "$RUN_ID" ]; then
593+
echo "Found release-repo run: $RUN_ID"
594+
break
595+
fi
596+
echo " Retry $i/10..."
597+
sleep 10
598+
done
599+
600+
if [ -z "$RUN_ID" ]; then
601+
echo "::error::Could not find release-repo plugin workflow run"
602+
exit 1
603+
fi
604+
605+
echo "⏳ Waiting for release-repo run $RUN_ID to complete (includes manual deploy-to-live approval)..."
606+
gh run watch "$RUN_ID" \
607+
--repo docker/release-repo \
608+
--exit-status
609+
echo "✅ Release-repo plugin workflow completed successfully"
610+
577611
- name: Post summary
578612
env:
579613
VERSION: ${{ needs.prepare.outputs.version }}
@@ -594,6 +628,31 @@ jobs:
594628
The plugin release workflow has been triggered in [docker/release-repo](https://github.com/docker/release-repo/actions/workflows/plugin.yml).
595629
SUMMARY
596630
631+
# ---------------------------------------------------------------------------
632+
# Verify Docker CE installation — run test-docker-ce-installation.sh
633+
# to confirm the CLI version is available via get.docker.com
634+
# ---------------------------------------------------------------------------
635+
verify-docker-ce:
636+
needs: [prepare, release-cli-docker-ce, build]
637+
runs-on: ubuntu-latest
638+
timeout-minutes: 15
639+
strategy:
640+
fail-fast: false
641+
matrix:
642+
base_image:
643+
- ubuntu:24.04
644+
- debian:12
645+
steps:
646+
- name: Checkout code
647+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
648+
649+
- name: Verify Docker CE installation
650+
env:
651+
BASE_IMAGE: ${{ matrix.base_image }}
652+
run: |
653+
chmod +x scripts/test-docker-ce-installation.sh
654+
./scripts/test-docker-ce-installation.sh "${{ needs.prepare.outputs.release_tag }}"
655+
597656
# ---------------------------------------------------------------------------
598657
# Create GitHub Release with AI-generated release notes
599658
# ---------------------------------------------------------------------------

scripts/test-docker-ce-installation.sh

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,26 @@
33
set -eux -o pipefail
44

55
main() {
6-
# Find the remote that points to docker/model-runner.
7-
local remote
8-
remote=$(git remote -v | awk '/docker\/model-runner/ && /\(fetch\)/ {print $1; exit}')
9-
10-
if [ -n "$remote" ]; then
11-
echo "Fetching tags from $remote (docker/model-runner)..."
12-
git fetch "$remote" --tags >/dev/null 2>&1 || echo "Warning: Failed to fetch tags from $remote. Continuing with local tags." >&2
13-
else
14-
echo "Warning: No remote found for docker/model-runner, using local tags only" >&2
15-
fi
16-
17-
local cli_version
18-
cli_version=$(git tag -l --sort=-version:refname "cmd/cli/v*" | head -1 | sed 's|^cmd/cli/||')
6+
local cli_version="${1:-}"
197

8+
# If no version argument provided, try to detect from git tags
209
if [ -z "$cli_version" ]; then
21-
echo "Error: Could not determine CLI version from git tags" >&2
22-
exit 1
10+
local remote
11+
remote=$(git remote -v | awk '/docker\/model-runner/ && /\(fetch\)/ {print $1; exit}')
12+
13+
if [ -n "$remote" ]; then
14+
echo "Fetching tags from $remote (docker/model-runner)..."
15+
git fetch "$remote" --tags >/dev/null 2>&1 || echo "Warning: Failed to fetch tags from $remote. Continuing with local tags." >&2
16+
else
17+
echo "Warning: No remote found for docker/model-runner, using local tags only" >&2
18+
fi
19+
20+
cli_version=$(git tag -l --sort=-version:refname "v*" | head -1)
21+
22+
if [ -z "$cli_version" ]; then
23+
echo "Error: Could not determine CLI version from git tags. Pass version as argument: $0 <version>" >&2
24+
exit 1
25+
fi
2326
fi
2427

2528
echo "Testing Docker CE installation with expected CLI version: $cli_version"

0 commit comments

Comments
 (0)