summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--version-manifest/pom.xml13
-rwxr-xr-xversion-manifest/src/main/scripts/check-java-manifest.sh32
2 files changed, 45 insertions, 0 deletions
diff --git a/version-manifest/pom.xml b/version-manifest/pom.xml
index 4202b2655..27fb4f478 100644
--- a/version-manifest/pom.xml
+++ b/version-manifest/pom.xml
@@ -149,6 +149,19 @@
</arguments>
</configuration>
</execution>
+ <execution>
+ <id>check-java-artifacts-released</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <arguments>
+ <argument>${project.basedir}/src/main/scripts/check-java-manifest.sh</argument>
+ <argument>${project.basedir}/src/main/resources/java-manifest.csv</argument>
+ </arguments>
+ </configuration>
+ </execution>
</executions>
</plugin>
</plugins>
diff --git a/version-manifest/src/main/scripts/check-java-manifest.sh b/version-manifest/src/main/scripts/check-java-manifest.sh
new file mode 100755
index 000000000..3c6db49a6
--- /dev/null
+++ b/version-manifest/src/main/scripts/check-java-manifest.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+if [ "$#" -ne 1 ]; then
+ echo This script checks java-manifest.csv to verify that the specified versions have been released in nexus
+ echo "$0 <java-manifest.csv>"
+ exit 1
+fi
+
+if [ -z "$WORKSPACE" ]; then
+ export WORKSPACE=`git rev-parse --show-toplevel`
+fi
+
+NEXUS_RELEASE_PREFIX="https://nexus.onap.org/content/repositories/releases"
+
+err=0
+for line in $(tail -n +2 $1); do
+ group=$(echo $line | cut -d , -f 1)
+ artifact=$(echo $line | cut -d , -f 2)
+ version=$(echo $line | cut -d , -f 3)
+ path=$(echo $group/$artifact | tr '.' '/')
+
+ url="$NEXUS_RELEASE_PREFIX/$path/$version/"
+ http_code=$(curl -s -o /dev/null -I -w "%{http_code}" $url)
+ if [ $http_code -ne 200 ]; then
+ echo "[WARNING] $group:$artifact:$version not released"
+ (( err++ ))
+ else
+ echo "[INFO] $group:$artifact:$version OK"
+ fi
+done
+#exit $err
+exit 0