anchore / ci-tools

Contains scripts for running anchore engine in CI pipelines
Apache License 2.0
34 stars 33 forks source link

Move report copy to cleanup stage to have them even in case of scan failure #25

Closed Karreg closed 4 years ago

Karreg commented 4 years ago

Move report copy to cleanup stage to have them even in case of scan failure.

Fix #24

Explain why this change is being made.

Report were not generated when both -r and -f options were used, and when scan is failing.

Explain how this is accomplished.

I tried a lot of things, but this script is not really easy to maintain. The cleanest way I found was to move the report copy step in the cleanup stage, which is not a bad stage for that either.

Merge/Deploy Checklist

How do you manually test this?

inline_scan -p -r -f ubuntu:latest will generate reports, before and after the change. inline_scan -p -r -f alpine:3.7 will NOT generate reports before, and it will generate reports after the change

Screenshots

Desktop Mobile
image_placeholder image_placeholder
Btodhunter commented 4 years ago

@Karreg awesome, thank you! This is exactly the fix I was thinking about. If you could sign your commit to get the DCO passing I'll merge to master.

Karreg commented 4 years ago

Aaaaand it's done...

Btodhunter commented 4 years ago

Thanks @Karreg! LGTM!