Skip to content

Commit

Permalink
🧹 extend docker example with annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-rock committed Jan 27, 2024
1 parent 405dd18 commit ed9be25
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions examples/docker/docker-ubuntu.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ packer {
required_plugins {
docker = {
version = ">= 0.0.7"
source = "github.com/hashicorp/docker"
source = "github.com/hashicorp/docker"
}
cnspec = {
version = ">= 10.0.0"
Expand Down Expand Up @@ -40,12 +40,17 @@ build {
}

provisioner "cnspec" {
on_failure = "continue"
asset_name = "${var.image_prefix}-${local.timestamp}"
on_failure = "continue"
asset_name = "${var.image_prefix}-${local.timestamp}"
annotations = {
Name = "${var.image_prefix}-${local.timestamp}"
Name = "${var.image_prefix}-${local.timestamp}"
Description = "Mondoo Secure Ubuntu 20.04 Base Image"
# see https://developer.hashicorp.com/packer/docs/templates/hcl_templates/contextual-variables#build-variables
Build = "${ build.PackerRunUUID }"
Source = "${ source.name }"
SourceImageDigest = "${ build.SourceImageDigest }"
}
output = "junit"
output = "junit"
output_target = "test-results.xml"
}
}

0 comments on commit ed9be25

Please sign in to comment.