-
Notifications
You must be signed in to change notification settings - Fork 138
/
main.tf
46 lines (39 loc) · 1.02 KB
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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 "latest" {
source = "../../tflib/publisher"
name = basename(path.module)
target_repository = var.target_repository
config = module.latest-config.config
extra_dev_packages = [
"build-base",
"py3-pip",
"python3-dev"
]
}
module "test-latest" {
source = "./tests"
digest = module.latest.image_ref
}
module "test-latest-dev" {
source = "./tests"
check-dev = true # Check for PIP in dev variants.
digest = module.latest.dev_ref
}
resource "oci_tag" "latest" {
depends_on = [module.test-latest]
digest_ref = module.latest.image_ref
tag = "latest"
}
resource "oci_tag" "latest-dev" {
depends_on = [module.test-latest-dev]
digest_ref = module.latest.dev_ref
tag = "latest-dev"
}