mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-09 03:48:05 +00:00
Merge pull request #10134 from ldoktor/ci-sort-range
ci.ocp: Sort images according to git
This commit is contained in:
commit
b9025462fb
@ -16,9 +16,12 @@ REPO="quay.io/kata-containers/kata-deploy-ci"
|
|||||||
TAGS=$(skopeo list-tags "docker://$REPO")
|
TAGS=$(skopeo list-tags "docker://$REPO")
|
||||||
# Only amd64
|
# Only amd64
|
||||||
TAGS=$(echo "$TAGS" | jq '.Tags' | jq "map(select(endswith(\"$ARCH\")))" | jq -r '.[]')
|
TAGS=$(echo "$TAGS" | jq '.Tags' | jq "map(select(endswith(\"$ARCH\")))" | jq -r '.[]')
|
||||||
# Tags since $GOOD
|
# Sort by git
|
||||||
TAGS=$(echo "$TAGS" | sed -n -e "/$GOOD/,$$p")
|
SORTED=""
|
||||||
# Tags up to $BAD
|
[ -n "$BAD" ] && LOG_ARGS="$GOOD~1..$BAD" || LOG_ARGS="$GOOD~1.."
|
||||||
[ -n "$BAD" ] && TAGS=$(echo "$TAGS" | sed "/$BAD/q")
|
for TAG in $(git log --merges --pretty=format:%H --reverse $LOG_ARGS); do
|
||||||
|
[[ "$TAGS" =~ "$TAG" ]] && SORTED+="
|
||||||
|
kata-containers-$TAG-$ARCH"
|
||||||
|
done
|
||||||
# Comma separated tags with repo
|
# Comma separated tags with repo
|
||||||
echo "$TAGS" | sed -e "s@^@$REPO:@" | paste -s -d, -
|
echo "$SORTED" | tail -n +2 | sed -e "s@^@$REPO:@" | paste -s -d, -
|
||||||
|
Loading…
Reference in New Issue
Block a user