diff options
author | Yang Xu <yang.xu3@huawei.com> | 2018-05-10 17:56:03 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-05-10 17:56:03 +0000 |
commit | 4db256fbea582a546c701c51c2148505adf2851a (patch) | |
tree | af58c8ae7961c2ea535000c83dcae36dd2863815 /version-manifest/src/main/scripts/check-docker-manifest.sh | |
parent | 2dfb8828eefbe86e95eec8747fb197612aa7b091 (diff) | |
parent | af169aae0888c2157f2373f4c2ee28757e118d08 (diff) |
Merge "Warn of unreleased docker images in manifest"
Diffstat (limited to 'version-manifest/src/main/scripts/check-docker-manifest.sh')
-rwxr-xr-x | version-manifest/src/main/scripts/check-docker-manifest.sh | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/version-manifest/src/main/scripts/check-docker-manifest.sh b/version-manifest/src/main/scripts/check-docker-manifest.sh index 61eb5a2a9..26e63b82d 100755 --- a/version-manifest/src/main/scripts/check-docker-manifest.sh +++ b/version-manifest/src/main/scripts/check-docker-manifest.sh @@ -10,18 +10,28 @@ if [ -z "$WORKSPACE" ]; then export WORKSPACE=`git rev-parse --show-toplevel` fi -NEXUS_PREFIX="https://nexus3.onap.org/repository/docker.public/v2" +NEXUS_PUBLIC_PREFIX="https://nexus3.onap.org/repository/docker.public/v2" +NEXUS_RELEASE_PREFIX="https://nexus3.onap.org/repository/docker.release/v2" err=0 for line in $(tail -n +2 $1); do image=$(echo $line | cut -d , -f 1) tag=$(echo $line | cut -d , -f 2) - tags=$(curl -s $NEXUS_PREFIX/$image/tags/list | jq -r '.tags[]') + + tags=$(curl -s $NEXUS_PUBLIC_PREFIX/$image/tags/list | jq -r '.tags[]' 2> /dev/null) echo "$tags" | grep -q "^$tag\$" if [ $? -ne 0 ]; then echo "[ERROR] $image:$tag not found" - echo "$tags" | sed 's/^/ /' + #echo "$tags" | sed 's/^/ /' (( err++ )) + + else + tags=$(curl -s $NEXUS_RELEASE_PREFIX/$image/tags/list | jq -r '.tags[]' 2> /dev/null) + echo "$tags" | grep -q "^$tag\$" + if [ $? -ne 0 ]; then + echo "[WARN] $image:$tag not released" + #echo "$tags" | sed 's/^/ /' + fi fi done exit $err |