Skip to content

Commit

Permalink
automated commit
Browse files Browse the repository at this point in the history
Signed-off-by: Public copy <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Jan 14, 2025
1 parent 1f9dbd0 commit 1505c27
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 26 deletions.
45 changes: 20 additions & 25 deletions images/node/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ module "config" {
source = "./config"
}

module "config-next" {
module "config-slim" {
extra_packages = [
"nodejs"
each.key,
]
source = "./config"
for_each = module.versions.versions
source = "./config"
}

module "versioned" {
Expand All @@ -36,10 +37,10 @@ module "versioned" {
config = module.config[each.key].config
eol = each.value.eol
extra_dev_packages = [
"yarn",
"build-base",
"corepack",
"pnpm",
"build-base",
"yarn",
]
for_each = module.versions.versions
main_package = each.value.main
Expand All @@ -49,22 +50,16 @@ module "versioned" {
update-repo = each.value.is_latest
}

module "next" {
build-dev = true
config = module.config-next.config
extra_dev_packages = [
"yarn",
"build-base",
"npm",
"corepack",
"pnpm",
"busybox",
]
main_package = ""
module "versioned-slim" {
build-dev = false
config = module.config-slim[each.key].config
eol = each.value.eol
for_each = module.versions.versions
main_package = each.value.main
name = basename(path.module)
source = "../../tflib/publisher"
target_repository = var.target_repository
update-repo = false
update-repo = each.value.is_latest
}

module "test-versioned" {
Expand All @@ -74,21 +69,21 @@ module "test-versioned" {
source = "./tests"
}

module "test-next" {
dev-digest = module.next.dev_ref
digest = module.next.image_ref
module "test-versioned-slim" {
dev-digest = module.versioned[each.key].dev_ref
digest = module.versioned-slim[each.key].image_ref
for_each = module.versions.versions
source = "./tests"
}

module "tagger" {
depends_on = [module.test-versioned, module.test-next]
depends_on = [module.test-versioned, module.test-versioned-slim]
source = "../../tflib/tagger"
tags = merge(
{
"next" = module.next.image_ref,
"next-dev" = module.next.dev_ref,
"latest-slim" = module.versioned-slim[module.versions.ordered_keys[0]].image_ref,
},
[for v in module.versioned : v.latest_tag_map]...
[for k in module.versions.ordered_keys : module.versioned[k].latest_tag_map]...
)
}

2 changes: 1 addition & 1 deletion images/node/tests/01-dockerfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CONTAINER="node-example-${FREE_PORT}"

function cleanup() {
docker kill ${CONTAINER}
docker rmi ${TAG}
docker rmi -f ${TAG}
}

trap cleanup EXIT
Expand Down

0 comments on commit 1505c27

Please sign in to comment.