aboutsummaryrefslogtreecommitdiffstats
path: root/version-manifest/src/main/scripts/check-docker-manifest.sh
diff options
context:
space:
mode:
authorHelen Chen <helen.chen@huawei.com>2018-05-04 05:32:17 +0000
committerGerrit Code Review <gerrit@onap.org>2018-05-04 05:32:17 +0000
commit7980e11182a1045b9d1322576b3eaa18e0475cd5 (patch)
tree29b617acd837d7aa240d5e6044f3fbd10eabc36c /version-manifest/src/main/scripts/check-docker-manifest.sh
parenteb573b85720f0485f865001aa57c902c9eed8a58 (diff)
parent7f114f5e27b5565fb3923eff9ad1bd6955ce1844 (diff)
Merge "Verify that docker manifest images exist in nexus3"
Diffstat (limited to 'version-manifest/src/main/scripts/check-docker-manifest.sh')
-rwxr-xr-xversion-manifest/src/main/scripts/check-docker-manifest.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/version-manifest/src/main/scripts/check-docker-manifest.sh b/version-manifest/src/main/scripts/check-docker-manifest.sh
new file mode 100755
index 000000000..9064c836d
--- /dev/null
+++ b/version-manifest/src/main/scripts/check-docker-manifest.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+if [ -z "$WORKSPACE" ]; then
+ export WORKSPACE=`git rev-parse --show-toplevel`
+fi
+
+NEXUS_PREFIX="https://nexus3.onap.org/repository/docker.public/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[]')
+ echo "$tags" | grep -q "^$tag\$"
+ if [ $? -ne 0 ]; then
+ echo "[ERROR] $image:$tag not found"
+ echo "$tags" | sed 's/^/ /'
+ (( err++ ))
+ fi
+done
+exit $err