diff options
author | Sylvain Desbureaux <sylvain.desbureaux@orange.com> | 2021-12-08 12:59:32 +0100 |
---|---|---|
committer | Sylvain Desbureaux <sylvain.desbureaux@orange.com> | 2021-12-14 08:49:03 +0000 |
commit | d035a0a5fea7bf94cab1b1d6816c61febdfb8eb6 (patch) | |
tree | 2acfee29c3f3ad76b0ad6661b42efa1a548ac831 /kubernetes/contrib/tools | |
parent | d09f363e87c98d19ba2fccdf8f235d5cbfb908ee (diff) |
[GLOBAL] Move to Gitlab
Add all necessary files in order to move OOM repo to gitlab and also
uses gitlab-ci features.
Issue-ID: OOM-1
Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com>
Change-Id: Ie3ba8d22828b103219d590886a8c58825eff2eef
Diffstat (limited to 'kubernetes/contrib/tools')
-rwxr-xr-x | kubernetes/contrib/tools/check-for-staging-images.sh | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/kubernetes/contrib/tools/check-for-staging-images.sh b/kubernetes/contrib/tools/check-for-staging-images.sh deleted file mode 100755 index 9705ee6ea8..0000000000 --- a/kubernetes/contrib/tools/check-for-staging-images.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh - -# Copyright © 2020 Samsung Electronics -# -# 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. - -BASE_URL="https://nexus3.onap.org/repository/docker.release" - -if [ "$GERRIT_BRANCH" = "staging" ]; then - exit 0 -fi - -USED_IMAGES=$(grep -r -E -o -h ':\s*onap/.*:.*' | sed -e 's/^: //' -e 's/^ //' | sort | uniq) -REPO_IMAGES=$(curl -s $BASE_URL/v2/_catalog | jq -r '.repositories[]') -NOT_AVAILABLE_IMAGES=$(echo "$USED_IMAGES" | grep -vE "$(echo "$REPO_IMAGES" | tr "\n" "|" | sed 's/|$//')") -USED_IMAGES=$(echo "$USED_IMAGES" | grep -E "$(echo "$REPO_IMAGES" | tr "\n" "|" | sed 's/|$//')") -for i in $USED_IMAGES; do - TMP_IMG=$(echo "$i" | cut -d ":" -f1) - TMP_TAG=$(echo "$i" | cut -d ":" -f2) - if [ "$LAST_IMG" != "$TMP_IMG" ]; then - AVAILABLE_TAGS=$(curl -s $BASE_URL/v2/$TMP_IMG/tags/list | jq -r '.tags[]') - fi - if ! echo "$AVAILABLE_TAGS" | grep "$TMP_TAG" > /dev/null; then - NOT_AVAILABLE_IMAGES="$NOT_AVAILABLE_IMAGES\n$i" - fi - LAST_IMG="$TMP_IMG" - printf "." -done -printf "\n" -if [ -n "$NOT_AVAILABLE_IMAGES" ]; then - echo "[ERROR] Only release images are allowed in helm charts." - echo "[ERROR] Images not found in release repo:" - printf "%b$NOT_AVAILABLE_IMAGES\n" - exit 1 -fi -exit 0 |