Skip to content

Commit

Permalink
Merge pull request #4971 from wzshiming/feat/gen-promote-kwok
Browse files Browse the repository at this point in the history
Add the script for promote kwok
  • Loading branch information
k8s-ci-robot authored Mar 19, 2023
2 parents dce2797 + c5da90f commit 200e1fc
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 16 deletions.
39 changes: 39 additions & 0 deletions registry.k8s.io/images/k8s-staging-kwok/generate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/usr/bin/env bash

# Copyright 2023 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -o errexit
set -o nounset
set -o pipefail

readonly repo="gcr.io/k8s-staging-kwok"

readonly tag_filter="(tags~^v[0-9]+\.[0-9]+\.[0-9]+$) OR (tags~^v[0-9]+\.[0-9]+\.[0-9]+-k8s.v[0-9]+\.[0-9]+\.[0-9]+$)"
readonly images=(
kwok
cluster
)

for image in "${images[@]}"; do
echo "- name: ${image}"
echo " dmap:"
gcloud container images list-tags \
"${repo}/$image" \
--format="get(digest, tags)" \
--sort-by="~tags" \
--filter="${tag_filter}" | \
sed -e 's/\([^ ]*\)\t\(.*\)/ "\1": [ "\2" ]/' | \
sed -e 's/;/", "/g'
done
31 changes: 15 additions & 16 deletions registry.k8s.io/images/k8s-staging-kwok/images.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
- name: kwok
dmap:
"sha256:bc42b570f7e0a3ef92f5838a701f4a1ade792f9060ca0cc5b8c2e2c6cf2d9726": ["v0.1.1"]
"sha256:03308ed8f9cca3eb9fbf538d7f2f13402b61dbc0302cc2b17b718388b69e52c0": ["v0.1.0"]
"sha256:8f03c71a0c4b20c7b2ba00a5864efb85dc8cec948d880b3f6cf0d653d037e383": ["v0.0.1"]

"sha256:bc42b570f7e0a3ef92f5838a701f4a1ade792f9060ca0cc5b8c2e2c6cf2d9726": [ "v0.1.1" ]
"sha256:03308ed8f9cca3eb9fbf538d7f2f13402b61dbc0302cc2b17b718388b69e52c0": [ "v0.1.0" ]
"sha256:8f03c71a0c4b20c7b2ba00a5864efb85dc8cec948d880b3f6cf0d653d037e383": [ "v0.0.1" ]
- name: cluster
dmap:
"sha256:356cbd3fa92a501d4f7653c24657a3204bec7fadd600d30348f331bbf6eb44a2": ["v0.1.1-k8s.v1.26.0"]
"sha256:28d6e16f6275471d2313557b1bb23c8990d7ab5364bf0284b3736e2bb7dd606f": ["v0.1.1-k8s.v1.25.3"]
"sha256:5e903c25274bf8b06a5440a7d452fb8e28c0ed6320576fc16ebcdc942352e7e6": ["v0.1.1-k8s.v1.24.7"]
"sha256:b1ffc13e5d61747072b7bbaa63d6d7b7fcc1c86b3611e1beccc0a64b26a002bb": ["v0.1.1-k8s.v1.23.13"]
"sha256:0b0663ca62083d2188038769f1a7144fddf9e3a82e59ef9bcbc38934cf720de9": ["v0.1.1-k8s.v1.22.15"]
"sha256:48080476b5080f0277b273920fddf4c8df746b0437947e83b560924b9b9072f0": ["v0.1.1-k8s.v1.21.14"]
"sha256:3422f3315f8f70baf9262e58bad5f5024ed8555c25181effb4cc8e0b82fb8bc7": ["v1.26", "v1.26.0", "v0.1.0-k8s.v1.26.0"]
"sha256:85b8074f7ad9d1805473d5236f7a72e9b29f5bbec91da089fb3025ee573b6722": ["v1.25", "v1.25.3", "v0.1.0-k8s.v1.25.3"]
"sha256:b4c2d129bd2b6c8b1880330bd3cb3caad003ff6768a6fb40facdcf6c3e1962f3": ["v1.24", "v1.24.7", "v0.1.0-k8s.v1.24.7"]
"sha256:c1b6a1af137984502bb8bdd722c9cd7d881c076626d6293e1e2a2811579303a5": ["v1.23", "v1.23.13", "v0.1.0-k8s.v1.23.13"]
"sha256:4bdf4f67a8a2178f1ed9bb2ca83395529ef47ac97bf0eb56846cdee9028123fd": ["v1.22", "v1.22.15", "v0.1.0-k8s.v1.22.15"]
"sha256:a16e941d206db3e6018dfadfa37b6eca59c5d11488b93fd3bde6f618942a8584": ["v1.21", "v1.21.14", "v0.1.0-k8s.v1.21.14"]
"sha256:356cbd3fa92a501d4f7653c24657a3204bec7fadd600d30348f331bbf6eb44a2": [ "v0.1.1-k8s.v1.26.0" ]
"sha256:28d6e16f6275471d2313557b1bb23c8990d7ab5364bf0284b3736e2bb7dd606f": [ "v0.1.1-k8s.v1.25.3" ]
"sha256:5e903c25274bf8b06a5440a7d452fb8e28c0ed6320576fc16ebcdc942352e7e6": [ "v0.1.1-k8s.v1.24.7" ]
"sha256:b1ffc13e5d61747072b7bbaa63d6d7b7fcc1c86b3611e1beccc0a64b26a002bb": [ "v0.1.1-k8s.v1.23.13" ]
"sha256:0b0663ca62083d2188038769f1a7144fddf9e3a82e59ef9bcbc38934cf720de9": [ "v0.1.1-k8s.v1.22.15" ]
"sha256:48080476b5080f0277b273920fddf4c8df746b0437947e83b560924b9b9072f0": [ "v0.1.1-k8s.v1.21.14" ]
"sha256:3422f3315f8f70baf9262e58bad5f5024ed8555c25181effb4cc8e0b82fb8bc7": [ "v0.1.0-k8s.v1.26.0", "v1.26", "v1.26.0" ]
"sha256:85b8074f7ad9d1805473d5236f7a72e9b29f5bbec91da089fb3025ee573b6722": [ "v0.1.0-k8s.v1.25.3", "v1.25", "v1.25.3" ]
"sha256:b4c2d129bd2b6c8b1880330bd3cb3caad003ff6768a6fb40facdcf6c3e1962f3": [ "v0.1.0-k8s.v1.24.7", "v1.24", "v1.24.7" ]
"sha256:c1b6a1af137984502bb8bdd722c9cd7d881c076626d6293e1e2a2811579303a5": [ "v0.1.0-k8s.v1.23.13", "v1.23", "v1.23.13" ]
"sha256:4bdf4f67a8a2178f1ed9bb2ca83395529ef47ac97bf0eb56846cdee9028123fd": [ "v0.1.0-k8s.v1.22.15", "v1.22", "v1.22.15" ]
"sha256:a16e941d206db3e6018dfadfa37b6eca59c5d11488b93fd3bde6f618942a8584": [ "v0.1.0-k8s.v1.21.14", "v1.21", "v1.21.14" ]

0 comments on commit 200e1fc

Please sign in to comment.