mirror of https://github.com/hashicorp/packer
parent
0272dc3705
commit
31fb3f253c
@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
bash -c "$(curl -sSL https://install.mondoo.com/sh)"
|
||||
@ -0,0 +1,32 @@
|
||||
packer {
|
||||
required_plugins {
|
||||
docker = {
|
||||
version = ">= 1.0.0"
|
||||
source = "github.com/hashicorp/docker"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
source "docker" "test" {
|
||||
image = "debian"
|
||||
commit = true
|
||||
}
|
||||
|
||||
build {
|
||||
sources = ["source.docker.test"]
|
||||
hcp_packer_registry {
|
||||
bucket_name = "imnot"
|
||||
}
|
||||
provisioner "shell" {
|
||||
inline = [
|
||||
"apt-get update && apt-get -y install curl",
|
||||
"bash -c \"$(curl -sSL \"https://install.mondoo.com/sh\")\"",
|
||||
"cnquery sbom --output cyclonedx-json >/tmp/sbom_cyclonedx.json",
|
||||
]
|
||||
}
|
||||
|
||||
provisioner "hcp_sbom" {
|
||||
source = "/tmp/sbom_cyclonedx.json"
|
||||
destination = "sbom_cyclonedx.json"
|
||||
}
|
||||
}
|
||||
Loading…
Reference in new issue