-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor wolfi-base to config format (#1669)
Signed-off-by: Jason Hall <[email protected]>
- Loading branch information
Showing
5 changed files
with
35 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
variable "extra_packages" { | ||
description = "Additional packages to install." | ||
type = list(string) | ||
default = ["wolfi-base"] | ||
} | ||
|
||
module "accts" { | ||
source = "../../../tflib/accts" | ||
run-as = 0 | ||
} | ||
|
||
output "config" { | ||
value = jsonencode({ | ||
contents = { | ||
packages = var.extra_packages | ||
} | ||
accounts = module.accts.block | ||
cmd = "/bin/sh -l" | ||
}) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,32 @@ | ||
terraform { | ||
required_providers { | ||
oci = { source = "chainguard-dev/oci" } | ||
} | ||
} | ||
|
||
variable "target_repository" { | ||
description = "The docker repo into which the image and attestations should be published." | ||
} | ||
|
||
module "config" { | ||
source = "./config" | ||
} | ||
|
||
module "latest" { | ||
source = "../../tflib/publisher" | ||
|
||
name = basename(path.module) | ||
|
||
target_repository = var.target_repository | ||
config = file("${path.module}/configs/latest.apko.yaml") | ||
} | ||
|
||
module "version-tags" { | ||
source = "../../tflib/version-tags" | ||
package = "wolfi-base" | ||
config = module.latest.config | ||
config = module.config.config | ||
} | ||
|
||
module "test-latest" { | ||
source = "./tests" | ||
digest = module.latest.image_ref | ||
} | ||
|
||
module "tagger" { | ||
source = "../../tflib/tagger" | ||
|
||
depends_on = [module.test-latest] | ||
|
||
tags = merge( | ||
{ for t in toset(concat(["latest"], module.version-tags.tag_list)) : t => module.latest.image_ref }, | ||
) | ||
resource "oci_tag" "latest" { | ||
digest_ref = module.latest.image_ref | ||
tag = "latest" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.