Gary Wu | 7f114f5 | 2018-05-03 17:06:06 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | if [ -z "$WORKSPACE" ]; then |
| 4 | export WORKSPACE=`git rev-parse --show-toplevel` |
| 5 | fi |
| 6 | |
| 7 | NEXUS_PREFIX="https://nexus3.onap.org/repository/docker.public/v2" |
| 8 | |
| 9 | err=0 |
| 10 | for line in $(tail -n +2 $1); do |
| 11 | image=$(echo $line | cut -d , -f 1) |
| 12 | tag=$(echo $line | cut -d , -f 2) |
| 13 | tags=$(curl -s $NEXUS_PREFIX/$image/tags/list | jq -r '.tags[]') |
| 14 | echo "$tags" | grep -q "^$tag\$" |
| 15 | if [ $? -ne 0 ]; then |
| 16 | echo "[ERROR] $image:$tag not found" |
| 17 | echo "$tags" | sed 's/^/ /' |
| 18 | (( err++ )) |
| 19 | fi |
| 20 | done |
| 21 | exit $err |