Commit 0553bb4c authored by Rémi VERCHERE's avatar Rémi VERCHERE
Browse files

Update .gitlab-ci.yml file

parent e8ffaa04
Pipeline #8719 failed with stages
in 1 minute and 30 seconds
......@@ -39,21 +39,19 @@ trivy:
script:
# Pull image
- >
for image in $(cat images.txt);
mkdir reports;
for img in $(cat images.txt);
do
echo "aa ${image}";
docker pull ${img};
trivy --exit-code 0 --cache-dir .trivycache/ --no-progress --severity MEDIUM,HIGH,CRITICAL --format template --template "@/usr/local/share/trivy/contrib/gitlab.tpl" -o reports/${img}.json ${img};
trivy --exit-code 0 --cache-dir .trivycache/ --no-progress --severity MEDIUM,HIGH,CRITICAL ${img};
done
- docker pull $IMAGE
# Build report
- trivy --exit-code 0 --cache-dir .trivycache/ --no-progress --severity MEDIUM,HIGH,CRITICAL --format template --template "@/usr/local/share/trivy/contrib/gitlab.tpl" -o report_$IMAGE.json $IMAGE
# Print report
- trivy --exit-code 0 --cache-dir .trivycache/ --no-progress --severity MEDIUM,HIGH,CRITICAL $IMAGE
cache:
paths:
- .trivycache/
artifacts:
paths:
- report_$IMAGE.json
- reports/
tags:
- docker-security
......@@ -63,7 +61,7 @@ pages:
- trivy
script:
- mkdir public/
- mv report_$IMAGE.json public/
- mv reports/* public/
artifacts:
paths:
- public
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment