aboutsummaryrefslogtreecommitdiffstats
path: root/version-manifest
diff options
context:
space:
mode:
Diffstat (limited to 'version-manifest')
-rw-r--r--version-manifest/pom.xml26
-rwxr-xr-xversion-manifest/src/main/scripts/check-docker-manifest-staging.sh29
-rwxr-xr-xversion-manifest/src/main/scripts/check-docker-manifest.sh2
3 files changed, 56 insertions, 1 deletions
diff --git a/version-manifest/pom.xml b/version-manifest/pom.xml
index 2b9722819..4a6291184 100644
--- a/version-manifest/pom.xml
+++ b/version-manifest/pom.xml
@@ -109,6 +109,19 @@
</configuration>
</execution>
<execution>
+ <id>check-docker-manifest-staging-sorted</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <arguments>
+ <argument>${project.basedir}/src/main/scripts/check-sorted.sh</argument>
+ <argument>${project.basedir}/src/main/resources/docker-manifest-staging.csv</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ <execution>
<id>check-java-manifest-sorted</id>
<phase>validate</phase>
<goals>
@@ -134,6 +147,19 @@
</arguments>
</configuration>
</execution>
+ <execution>
+ <id>check-staging-docker-images-exist</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <arguments>
+ <argument>${project.basedir}/src/main/scripts/check-docker-manifest-staging.sh</argument>
+ <argument>${project.basedir}/src/main/resources/docker-manifest-staging.csv</argument>
+ </arguments>
+ </configuration>
+ </execution>
</executions>
</plugin>
</plugins>
diff --git a/version-manifest/src/main/scripts/check-docker-manifest-staging.sh b/version-manifest/src/main/scripts/check-docker-manifest-staging.sh
new file mode 100755
index 000000000..e37029e93
--- /dev/null
+++ b/version-manifest/src/main/scripts/check-docker-manifest-staging.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+if [ "$#" -ne 1 ]; then
+ echo This script checks docker-manifest-staging.csv to verify that the specified versions exist in nexus3
+ echo "$0 <docker-manifest-staging.csv>"
+ exit 1
+fi
+
+if [ -z "$WORKSPACE" ]; then
+ export WORKSPACE=`git rev-parse --show-toplevel`
+fi
+
+NEXUS_PUBLIC_PREFIX="https://nexus3.onap.org/repository/docker.public/v2"
+NEXUS_RELEASE_PREFIX="https://nexus3.onap.org/repository/docker.release/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_PUBLIC_PREFIX/$image/tags/list | jq -r '.tags[]' 2> /dev/null)
+ echo "$tags" | grep -q "^$tag\$"
+ if [ $? -ne 0 ]; then
+ echo "[ERROR] $image:$tag not found"
+ #echo "$tags" | sed 's/^/ /'
+ (( err++ ))
+ fi
+done
+exit $err
diff --git a/version-manifest/src/main/scripts/check-docker-manifest.sh b/version-manifest/src/main/scripts/check-docker-manifest.sh
index 6aa2374b1..384e28434 100755
--- a/version-manifest/src/main/scripts/check-docker-manifest.sh
+++ b/version-manifest/src/main/scripts/check-docker-manifest.sh
@@ -1,7 +1,7 @@
#!/bin/bash
if [ "$#" -ne 1 ]; then
- echo This script checks docker-manifest.csv to verify that the specified versions exist in nexus3
+ echo This script checks docker-manifest.csv to verify that the specified versions have been released in nexus3
echo "$0 <docker-manifest.csv>"
exit 1
fi