Skip to content

Commit

Permalink
fixed the dockerpull url
Browse files Browse the repository at this point in the history
  • Loading branch information
CMYanko committed Apr 2, 2019
1 parent c3cd6cc commit 9962913
Showing 1 changed file with 23 additions and 12 deletions.
35 changes: 23 additions & 12 deletions listener/scripts/quay-scan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,38 @@ cd /etc/webhook;
AppID=${6/\//\_}
echo $AppID

# Valid stages are develop|build|stage-release|release|operate
Stage="stage_release"

for tag in $trimmedTags ; do
echo "=== testing $tag ==="
if [[ -z "$tag" ]] ; then
echo "Tag invalid"
else
echo "Tag Valid - Doing Scan";
DockerPull=$URL/$5/$4:$tag;
DockerPull=$2:$tag;
echo $DockerPull
doDockerScan $DockerPull $AppID
# doDockerScan $DockerPull $AppID
docker pull $DockerPull
docker save -o docker.tar $DockerPull
echo 'Should see a docker.tar file'
ls -lah
java -jar nexus-iq-cli.jar -s http://iq-server:8070 -i $AppID -t stage-release -a admin:admin docker.tar
rm docker.tar
docker rmi $DockerPull
ls -lah
fi
done

# Docker Scan Function to Call

doDockerScan () {
echo $1
docker pull $1
docker save -o docker.tar $1
ls -lah
java -jar nexus-iq-cli.jar -s http://iq-server:8070 -i $2 -a admin:admin docker.tar
rm docker.tar
docker rmi $1
ls -lah
}
# doDockerScan () {
# echo $1
# docker pull $1
# docker save -o docker.tar $1
# ls -lah
# java -jar nexus-iq-cli.jar -s http://iq-server:8070 -i $2 -a admin:admin docker.tar
# rm docker.tar
# docker rmi $1
# ls -lah
# }

0 comments on commit 9962913

Please sign in to comment.