-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Public copy <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
47723f9
commit 14be680
Showing
5 changed files
with
52 additions
and
60 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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,36 +1,41 @@ | ||
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 "latest-config" { source = "./config" } | ||
module "versions" { | ||
package = "loki" | ||
source = "../../tflib/versions" | ||
} | ||
|
||
module "latest" { | ||
source = "../../tflib/publisher" | ||
module "config" { | ||
extra_packages = [each.key] | ||
for_each = module.versions.versions | ||
source = "./config" | ||
} | ||
|
||
module "versioned" { | ||
build-dev = true | ||
config = module.config[each.key].config | ||
for_each = module.versions.versions | ||
main_package = each.value.main | ||
name = basename(path.module) | ||
source = "../../tflib/publisher" | ||
target_repository = var.target_repository | ||
config = module.latest-config.config | ||
build-dev = true | ||
update-repo = each.value.is_latest | ||
} | ||
|
||
module "test-latest" { | ||
source = "./tests" | ||
digest = module.latest.image_ref | ||
module "test-versioned" { | ||
digest = module.versioned[each.key].image_ref | ||
for_each = module.versions.versions | ||
loki_version = each.value.version | ||
source = "./tests" | ||
} | ||
|
||
resource "oci_tag" "latest" { | ||
depends_on = [module.test-latest] | ||
digest_ref = module.latest.image_ref | ||
tag = "latest" | ||
module "tagger" { | ||
depends_on = [module.test-versioned] | ||
source = "../../tflib/tagger" | ||
tags = merge( | ||
[for v in module.versioned : v.latest_tag_map]... | ||
) | ||
} | ||
|
||
resource "oci_tag" "latest-dev" { | ||
depends_on = [module.test-latest] | ||
digest_ref = module.latest.dev_ref | ||
tag = "latest-dev" | ||
} |
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 |
---|---|---|
|
@@ -10,3 +10,4 @@ upstream_url: https://grafana.com/oss/loki/ | |
keywords: | ||
- analytics | ||
- application | ||
public: true |
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