update link to upper-constraints.txt
[integration.git] / version-manifest / src / main / scripts / check-java-manifest.sh
1 #!/bin/bash
2
3 if [ "$#" -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
7 fi
8
9 if [ -z "$WORKSPACE" ]; then
10     export WORKSPACE=`git rev-parse --show-toplevel`
11 fi
12
13 NEXUS_RELEASE_PREFIX="https://nexus.onap.org/content/repositories/releases"
14
15 err=0
16 for 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
30 done
31 #exit $err
32 exit 0