5 echo "Generating patchset file to list changed files"
6 git diff HEAD^1 --name-only | sed "s#^#/home/opnfv/anteater/$PROJECT/#" > $WORKSPACE/patchset
7 echo "Changed files are"
8 echo "--------------------------------------------------------"
9 cat $WORKSPACE/patchset
10 echo "--------------------------------------------------------"
12 vols="-v $WORKSPACE:/home/opnfv/anteater/$PROJECT"
13 envs="-e PROJECT=$PROJECT"
15 echo "Pulling releng-anteater docker image"
16 echo "--------------------------------------------------------"
17 docker pull opnfv/releng-anteater
18 echo "--------------------------------------------------------"
20 cmd="sudo docker run --privileged=true -id $envs $vols opnfv/releng-anteater /bin/bash"
21 echo "Running docker command $cmd"
23 echo "Container ID is $container_id"
24 cmd="anteater --project $PROJECT --patchset /home/opnfv/anteater/$PROJECT/patchset"
25 echo "Executing command inside container"
27 echo "--------------------------------------------------------"
28 docker exec $container_id $cmd | tee securityaudit.log
30 echo "--------------------------------------------------------"
31 echo "Stopping docker container with ID $container_id"
32 docker stop $container_id