summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
authorLuke Hinds <lhinds@redhat.com>2017-06-22 17:12:37 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-06-22 17:12:37 +0000
commit1e913025d88e0cf84ba6e9831654396a06643ec7 (patch)
tree845bf19cf78a652f5e94336f17d1ce410e0d714f /jjb
parentb7644e8f1f43b762bab51d8bc7a68298558a6bdf (diff)
parentb582903071ca4ee1ed453a8a1961e8f5c1eff68c (diff)
Merge "Directly Run Anteater Docker Container"
Diffstat (limited to 'jjb')
-rw-r--r--jjb/ci_gate_security/anteater-security-audit.sh16
1 files changed, 6 insertions, 10 deletions
diff --git a/jjb/ci_gate_security/anteater-security-audit.sh b/jjb/ci_gate_security/anteater-security-audit.sh
index d5c0e407c..2b5c26a5a 100644
--- a/jjb/ci_gate_security/anteater-security-audit.sh
+++ b/jjb/ci_gate_security/anteater-security-audit.sh
@@ -15,18 +15,14 @@ echo "--------------------------------------------------------"
docker pull opnfv/releng-anteater
echo "--------------------------------------------------------"
-cmd="sudo docker run --privileged=true -id $envs $vols opnfv/releng-anteater /bin/bash"
-echo "Running docker command $cmd"
-container_id=$($cmd)
-echo "Container ID is $container_id"
-cmd="anteater --project $PROJECT --patchset /home/opnfv/anteater/$PROJECT/patchset"
-echo "Executing command inside container"
+cmd="docker run -i $envs $vols --rm opnfv/releng-anteater \
+anteater --project $PROJECT --patchset /home/opnfv/anteater/$PROJECT/patchset"
+echo "Running docker container"
echo "$cmd"
-echo "--------------------------------------------------------"
-docker exec $container_id $cmd > $WORKSPACE/securityaudit.log 2>&1
+$cmd > $WORKSPACE/securityaudit.log 2>&1
exit_code=$?
echo "--------------------------------------------------------"
-echo "Stopping docker container with ID $container_id"
-docker stop $container_id
+echo "Docker container exited with code: $exit_code"
+echo "--------------------------------------------------------"
cat securityaudit.log
exit 0