File tree Expand file tree Collapse file tree 4 files changed +12
-10
lines changed Expand file tree Collapse file tree 4 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -100,10 +100,10 @@ build {
100100 only = [" qemu.almalinux-8-gcp-aarch64" ]
101101 }
102102
103- # copy the repo metadata file into output
103+ # copy SBOM metadata file into output
104104 post-processor "shell-local" {
105105 inline = [
106- " cp /tmp/repo-metadata -$PACKER_BUILD_NAME.txt output-$PACKER_BUILD_NAME/"
106+ " cp /tmp/sbom-data -$PACKER_BUILD_NAME.json output-$PACKER_BUILD_NAME/"
107107 ]
108108 }
109109
Original file line number Diff line number Diff line change @@ -100,10 +100,10 @@ build {
100100 only = [" qemu.almalinux-9-gcp-aarch64" ]
101101 }
102102
103- # copy the repo metadata file into output
103+ # copy SBOM metadata file into output
104104 post-processor "shell-local" {
105105 inline = [
106- " cp /tmp/repo-metadata -$PACKER_BUILD_NAME.txt output-$PACKER_BUILD_NAME/"
106+ " cp /tmp/sbom-data -$PACKER_BUILD_NAME.json output-$PACKER_BUILD_NAME/"
107107 ]
108108 }
109109
Original file line number Diff line number Diff line change 11---
2- - name : Include sbom_data role for SBOM data collection
3- include_role :
4- name : sbom_data
5- when : collect_sbom_data | bool
6-
72- name : Remove older versions kernel and other packages
83 ansible.builtin.command : dnf -y remove --oldinstallonly
94 register : removeoldoutput
105 changed_when : removeoldoutput.rc == 0
116 ignore_errors : yes
127
8+ - name : Include sbom_data role for SBOM data collection
9+ include_role :
10+ name : sbom_data
11+ when : collect_sbom_data | bool
12+
1313- name : Include repo metadata dump role (for SBOMs)
1414 include_role :
1515 name : dump_repo_metadata
Original file line number Diff line number Diff line change 77- name : Collect SBOM data from the system
88 ansible.builtin.shell : python3 /dev/shm/sbom_data_collector.py -o /dev/shm/sbom-data.json -v
99 register : sbom_data_collector
10+ failed_when : false
1011
1112- name : Write SBOM data to artifact file
1213 ansible.builtin.fetch :
1314 src : /dev/shm/sbom-data.json
14- dest : " /tmp/sbom-data-{{ packer_build_name }}.json"
15+ dest : /tmp/sbom-data-{{ packer_build_name }}.json
1516 flat : true
1617 become : false
18+ when : sbom_data_collector.changed
You can’t perform that action at this time.
0 commit comments