13 Commits

Author SHA1 Message Date
9fcfe9c5ab Sync upstream: drop armv7, add linux/ppc64le and linux/s390x
Some checks failed
Check upstream updates / check-updates (push) Has been cancelled
2026-02-23 13:26:45 +08:00
b1595aca2c Update LATEST_VERSION to 3355.v388858a_47b_33-14
Some checks failed
Build container image / build (push) Has been cancelled
Check upstream updates / check-updates (push) Has been cancelled
2026-02-18 00:29:47 +00:00
942f66f787 Update LATEST_VERSION to 3355.v388858a_47b_33-13
Some checks failed
Build container image / build (push) Has been cancelled
Check upstream updates / check-updates (push) Has been cancelled
2026-02-15 00:31:01 +00:00
25a2d66a00 Update LATEST_VERSION to 3355.v388858a_47b_33-12
Some checks failed
Build container image / build (push) Has been cancelled
Check upstream updates / check-updates (push) Has been cancelled
2026-02-09 00:30:12 +00:00
7983e87c28 Update LATEST_VERSION to 3355.v388858a_47b_33-11
Some checks failed
Build container image / build (push) Has been cancelled
Check upstream updates / check-updates (push) Has been cancelled
2026-02-08 00:36:29 +00:00
ae0a6312cf Update LATEST_VERSION to 3355.v388858a_47b_33-10
Some checks failed
Build container image / build (push) Has been cancelled
Check upstream updates / check-updates (push) Has been cancelled
2026-02-07 00:27:27 +00:00
a5dc24b7af Update LATEST_VERSION to 3355.v388858a_47b_33-9
Some checks failed
Build container image / build (push) Has been cancelled
Check upstream updates / check-updates (push) Has been cancelled
2026-02-05 00:29:20 +00:00
48199ea5a9 Update LATEST_VERSION to 3355.v388858a_47b_33-8
Some checks failed
Build container image / build (push) Has been cancelled
Check upstream updates / check-updates (push) Has been cancelled
2026-01-30 00:27:18 +00:00
706286cacd Update LATEST_VERSION to 3355.v388858a_47b_33-7
Some checks failed
Build container image / build (push) Has been cancelled
Check upstream updates / check-updates (push) Has been cancelled
2026-01-24 00:23:05 +00:00
0d66e641b6 Update LATEST_VERSION to 3355.v388858a_47b_33-6
Some checks failed
Build container image / build (push) Has been cancelled
Check upstream updates / check-updates (push) Has been cancelled
2026-01-22 00:25:03 +00:00
1a891324e3 Update LATEST_VERSION to 3355.v388858a_47b_33-5
Some checks failed
Build container image / build (push) Has been cancelled
Check upstream updates / check-updates (push) Has been cancelled
2026-01-09 02:19:03 +00:00
55d837beb0 Improve update script with redirection support and robustness. 2026-01-09 02:18:38 +00:00
467f2f6a1a Prevent "null" versions in update check. 2026-01-09 02:16:34 +00:00
3 changed files with 36 additions and 9 deletions

View File

@ -32,6 +32,6 @@ jobs:
context: .
push: true
tags: lamgc/jenkins-agent-docker:latest, lamgc/jenkins-agent-docker:${{ steps.get-version.outputs.version }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
cache-from: type=gha
cache-to: type=gha,mode=max
cache-to: type=gha,mode=max

View File

@ -1 +1 @@
null
3355.v388858a_47b_33-14

View File

@ -1,12 +1,39 @@
#!/bin/bash
LATEST_VERSION=$(curl -s https://api.github.com/repos/jenkinsci/docker-agent/releases/latest | jq -r '.tag_name')
CURL_EXIT_CODE=$?
if [ $CURL_EXIT_CODE -ne 0 ] || [ -z "$LATEST_VERSION" ]; then
echo "Failed to retrieve the latest version"
TEMP_JSON=$(mktemp)
trap 'rm -f "$TEMP_JSON"' EXIT
API_URL="https://api.github.com/repos/jenkinsci/docker-agent/releases/latest"
HTTP_CODE=$(curl -fsL -o "$TEMP_JSON" -w "%{http_code}" "$API_URL")
if [ $? -ne 0 ]; then
echo "Error: Network request failed."
exit 1
fi
if [ "$LATEST_VERSION" != "$(cat LATEST_VERSION)" ]; then
if [ "$HTTP_CODE" != "200" ]; then
echo "Error: API returned HTTP $HTTP_CODE"
if [ -s "$TEMP_JSON" ]; then
echo "Response body:"
cat "$TEMP_JSON"
fi
exit 1
fi
LATEST_VERSION=$(jq -r '.tag_name // empty' "$TEMP_JSON")
if [ -z "$LATEST_VERSION" ] || [ "$LATEST_VERSION" == "null" ]; then
echo "Error: Failed to extract tag_name from response."
exit 1
fi
if [ -f LATEST_VERSION ]; then
CURRENT_VERSION=$(cat LATEST_VERSION)
else
CURRENT_VERSION=""
fi
if [ "$LATEST_VERSION" != "$CURRENT_VERSION" ]; then
echo "New version found: $LATEST_VERSION (Old: $CURRENT_VERSION)"
echo "$LATEST_VERSION" > LATEST_VERSION
fi
else
echo "Already at latest version: $LATEST_VERSION"
fi