aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2018-06-06 14:52:29 -0700
committerGary Wu <gary.i.wu@huawei.com>2018-06-06 14:53:06 -0700
commit48e56a6234ece64d83d301ae06d2f6f53e56f935 (patch)
treed7dfbd344652a6bd58c732afbfbd83be08a293b4
parente644b420ed58abcaa4152e4a4e3fd410d14ddc53 (diff)
Allow only released docker images in the manifestv2.0.0
Change-Id: I8ebc0e6a8b923a4b9c81403ade7248a4396b179e Issue-ID: INT-504 Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
-rw-r--r--version-manifest/pom.xml2
-rwxr-xr-xversion-manifest/src/main/scripts/check-docker-manifest.sh12
2 files changed, 3 insertions, 11 deletions
diff --git a/version-manifest/pom.xml b/version-manifest/pom.xml
index daa957ed9..89fb1b170 100644
--- a/version-manifest/pom.xml
+++ b/version-manifest/pom.xml
@@ -122,7 +122,7 @@
</configuration>
</execution>
<execution>
- <id>check-docker-images-exist</id>
+ <id>check-docker-images-released</id>
<phase>validate</phase>
<goals>
<goal>exec</goal>
diff --git a/version-manifest/src/main/scripts/check-docker-manifest.sh b/version-manifest/src/main/scripts/check-docker-manifest.sh
index 26e63b82d..6aa2374b1 100755
--- a/version-manifest/src/main/scripts/check-docker-manifest.sh
+++ b/version-manifest/src/main/scripts/check-docker-manifest.sh
@@ -18,20 +18,12 @@ 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)
+ tags=$(curl -s $NEXUS_RELEASE_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 "[ERROR] $image:$tag not released"
#echo "$tags" | sed 's/^/ /'
(( err++ ))
-
- else
- tags=$(curl -s $NEXUS_RELEASE_PREFIX/$image/tags/list | jq -r '.tags[]' 2> /dev/null)
- echo "$tags" | grep -q "^$tag\$"
- if [ $? -ne 0 ]; then
- echo "[WARN] $image:$tag not released"
- #echo "$tags" | sed 's/^/ /'
- fi
fi
done
exit $err