Skip to content

Commit 4eb393e

Browse files
committed
Merge pull request #20577 from dreis2211
* gh-20577: Only suggest Ubuntu versions available in the Docker registry Closes gh-20577
2 parents d0ccb59 + e6abcac commit 4eb393e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ci/scripts/detect-ubuntu-image-updates.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
ISSUE_TITLE="Upgrade Ubuntu version in CI images"
44

55
ubuntu="bionic"
6-
latest=$( curl -s "https://partner-images.canonical.com/core/$ubuntu/current/unpacked/build-info.txt" | awk '{split($0, parts, "="); print parts[2]}' )
6+
latest=$( curl -s "https://hub.docker.com/v2/repositories/library/ubuntu/tags/?page_size=1&page=1&name=$ubuntu" | jq -c -r '.results[0].name' | awk '{split($0, parts, "-"); print parts[2]}' )
77
current=$( grep "ubuntu:$ubuntu" git-repo/ci/images/spring-boot-ci-image/Dockerfile | awk '{split($0, parts, "-"); print parts[2]}' )
88

99
if [[ $current = $latest ]]; then

0 commit comments

Comments
 (0)