blob: 3c6db49a60f629e9acff18fe24fb1af5af43de8e [file] [log] [blame]
Gary Wu96692b32018-10-12 13:13:13 -07001#!/bin/bash
2
3if [ "$#" -ne 1 ]; then
4 echo This script checks java-manifest.csv to verify that the specified versions have been released in nexus
5 echo "$0 <java-manifest.csv>"
6 exit 1
7fi
8
9if [ -z "$WORKSPACE" ]; then
10 export WORKSPACE=`git rev-parse --show-toplevel`
11fi
12
13NEXUS_RELEASE_PREFIX="https://nexus.onap.org/content/repositories/releases"
14
15err=0
16for line in $(tail -n +2 $1); do
17 group=$(echo $line | cut -d , -f 1)
18 artifact=$(echo $line | cut -d , -f 2)
19 version=$(echo $line | cut -d , -f 3)
20 path=$(echo $group/$artifact | tr '.' '/')
21
22 url="$NEXUS_RELEASE_PREFIX/$path/$version/"
23 http_code=$(curl -s -o /dev/null -I -w "%{http_code}" $url)
24 if [ $http_code -ne 200 ]; then
25 echo "[WARNING] $group:$artifact:$version not released"
26 (( err++ ))
27 else
28 echo "[INFO] $group:$artifact:$version OK"
29 fi
30done
31#exit $err
32exit 0