File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3939 run : |
4040 echo -n "${{ steps.meta.outputs.tag }}" > .version
4141
42+ - name : Export Clair vulnerability data
43+ # if: github.event_name != 'pull_request'
44+ run : |
45+ curl -L -o /tmp/clairctl https://github.com/quay/clair/releases/download/v4.9.0/clairctl-linux-amd64 && chmod +x /tmp/clairctl
46+ /tmp/clairctl --config ./data/clair/minimal_config.yaml export-updaters --strict ./data/clair/updates.json.gz
47+
4248 - name : Install ORAS
4349 uses : oras-project/setup-oras@v1
4450 with :
Original file line number Diff line number Diff line change 1717 state : directory
1818 mode : ' 0777'
1919
20- - name : Create minimal Clair config for export
21- ansible.builtin.copy :
22- dest : " {{ workingDir }}/data/clair/config.yaml"
23- content : |
24- http_listen_addr: :8080
25- introspection_addr: :8081
26- indexer:
27- connstring: ""
28- scanlock_retry: 10
29- layer_scan_concurrency: 5
30- matcher:
31- connstring: ""
32- max_conn_pool: 100
33- notifier:
34- connstring: ""
35- delivery_interval: 1m
20+ - name : Check if Clair updates file exists
21+ ansible.builtin.stat :
22+ path : " {{ workingDir }}/data/clair/updates.json.gz"
23+ register : clair_updates_stat_file
3624
3725- name : Export vulnerability data on Landing Zone
26+ when : not clair_updates_stat_file.stat.exists
3827 containers.podman.podman_container :
3928 name : clair-exporter
4029 image : " {{ clair_pod.spec.containers[0].image | regex_replace('^registry\\ .redhat\\ .io', quayHostname + ':8443') }}"
4433 volumes :
4534 - " {{ workingDir }}/data/clair:/data:Z"
4635 entrypoint : " /usr/bin/clairctl"
47- command : " --config /data/config .yaml export-updaters /data/updates.json.gz"
36+ command : " --config /data/minimal_config .yaml export-updaters --strict /data/updates.json.gz"
4837 detach : false
4938
5039- name : Ensure directory /var/www/html/clair/
You can’t perform that action at this time.
0 commit comments