Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for unsortable tags (SHA tags) and non-standard :latest tag #866

Open
wants to merge 1 commit into
base: devspaces-3-rhel-8
Choose a base branch
from

Conversation

nickboldt
Copy link
Member

@nickboldt nickboldt commented Dec 6, 2022

What does this PR do?

#21575 add support for unsorted tags (when dealing with non-semver image tags like
https://quay.io/repository/devfile/base-developer-image?tab=tags&tag=latest which is SHA-based tags);
add support for non-standard latet tag queries (eg., if there's no :latest tag, use :ubi8-latest)

Change-Id: I6b36210499b7625e19f2cf389f608d8cb452ff14
Signed-off-by: Nick Boldt nboldt@redhat.com

Screenshot/screencast of this PR

N/A

What issues does this PR fix or reference?

eclipse-che/che#21575

How to test this PR?

  1. check out this PR:

devfile/developer-images@ec3d8c0

  1. change the ubi8/Dockerfile so it's building from:
# https://quay.io/devfile/base-developer-image#^ubi8-
FROM quay.io/devfile/base-developer-image:ubi8-8d9dc15
  1. get scripts:
cd /tmp; curl -sSLkO https://raw.githubusercontent.com/redhat-developer/devspaces/2f8fbbea472be0f2953cb8ce33d72dc3ccfc20dd/product/getLatestImageTags.sh
cd /tmp; curl -sSLkO https://raw.githubusercontent.com/redhat-developer/devspaces/2f8fbbea472be0f2953cb8ce33d72dc3ccfc20dd/product/updateBaseImages.sh
chmod +x *.sh
  1. run an update of the Dockerfiles:
cd /where/you/have developer-images checked out/
/tmp/updateBaseImages.sh -b main -w `pwd` -f Dockerfile      -maxdepth 3 --no-commit --no-push  -x "latest|main|source" --latestNext ubi8-latest --sort-tags false -v

This is the error I don't let know how to work around -- the newer tag is found, but the "which one is greater?" check is failing:

#CURR_TAGver=ubi8; CURR_TAGrev=8d9dc15; CURR_TAGrevbase=8d9dc15; CURR_TAGrevsuf=8d9dc15
#LATE_TAGver=ubi8; LATE_TAGrev=13008af; LATE_TAGrevbase=13008af; LATE_TAGrevsuf=13008af
- quay.io/devfile/base-developer-image:ubi8-8d9dc15
/home/nboldt/p/updateBaseImages.sh: line 306: [[: 13008af: value too great for base (error token is "13008af")
/home/nboldt/p/updateBaseImages.sh: line 306: [[: 13008af: value too great for base (error token is "13008af")

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

…latest which is SHA-based tags);

add support for non-standard latet tag queries (eg., if there's no :latest tag, use :ubi8-latest)

Change-Id: I6b36210499b7625e19f2cf389f608d8cb452ff14
Signed-off-by: Nick Boldt <nboldt@redhat.com>
@nickboldt nickboldt changed the title https://quay.io/repository/devfile/base-devel... add support for unsortable tags (SHA tags) and non-standard :latest tag Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant