tricks/scripts/check-scan-report
Elia el Lazkani f2b4f86269
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/promote/production Build is passing
chore(): Migrating to testing python automation
2023-07-05 23:01:39 +02:00

22 lines
449 B
Python
Executable file

#!/usr/bin/env python
import sys
from args import argument_parse
from oras import Oras
from trivy import Trivy
def main():
args = argument_parse()
oras = Oras(args.image, args.tag)
scan_report = oras.check_scan_report()
if not scan_report:
sys.exit(1)
trivy = Trivy(args.image, args.tag)
scan = trivy.scan_to_promote(image_src="remote")
if not scan:
sys.exit(1)
if __name__ == '__main__':
main()