forked from dependency-check/DependencyCheck
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpublish-docker.sh
More file actions
executable file
·25 lines (22 loc) · 806 Bytes
/
publish-docker.sh
File metadata and controls
executable file
·25 lines (22 loc) · 806 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash -e
VERSION=$(mvn -q \
-Dexec.executable="echo" \
-Dexec.args='${project.version}' \
--non-recursive \
org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
if [[ $VERSION = *"SNAPSHOT"* ]]; then
echo "Do not publish a snapshot version of dependency-check"
exit 1
fi
docker inspect --type=image owasp/dependency-check:$VERSION > /dev/null 2>&1
if [[ "$?" -ne 0 ]] ; then
echo "docker image owasp/dependency-check:$VERSION does not exist - run build_docker.sh first"
exit 1
fi
docker inspect --type=image owasp/dependency-check:latest > /dev/null 2>&1
if [[ "$?" -ne 0 ]] ; then
echo "docker image owasp/dependency-check:latest does not exist - run build_docker.sh first"
exit 1
fi
docker push owasp/dependency-check:$VERSION
docker push owasp/dependency-check:latest