blob: ea8a9be2e6d9d02521e4b8e8b5585372f83c9ac5 [file] [log] [blame]
Mohammed Naser37694382024-04-02 21:11:31 -04001variable "REGISTRY" {
2 default = "registry.atmosphere.dev/library"
3}
4
5variable "CACHE_REGISTRY" {
6 default = "registry.atmosphere.dev/cache"
7}
8
9variable "PUSH_TO_CACHE" {
10 default = false
11}
12
13function "cache_from" {
14 params = [image]
15 result = ["type=registry,ref=${CACHE_REGISTRY}/${image}"]
16}
17
18function "cache_to" {
19 params = [image]
20 result = PUSH_TO_CACHE ? [format("%s,%s", cache_from(image)[0], "mode=max,image-manifest=true,oci-mediatypes=true,compression=zstd")] : []
21}
22
Mohammed Naser37694382024-04-02 21:11:31 -040023target "barbican" {
24 name = "barbican-${release.tgt}"
Mohammed Naser682ba512024-04-03 13:56:18 -040025
26 context = "."
27 target = "barbican"
Mohammed Naser37694382024-04-02 21:11:31 -040028
29 cache-from = cache_from("barbican:${release.name}")
30 cache-to = cache_to("barbican:${release.name}")
31
32 tags = [
33 "${REGISTRY}/barbican:${release.name}",
34 "${REGISTRY}/barbican:${release.ref}"
35 ]
36
37 matrix = {
38 release = [
39 {
40 tgt = "bobcat",
41 name = "2023.2",
42 ref = "a00fcade4138ffc52cd9c84b5999297966f019b5"
43 }
44 ]
45 }
46
Mohammed Naser37694382024-04-02 21:11:31 -040047 args = {
48 RELEASE = release.name
Mohammed Naser682ba512024-04-03 13:56:18 -040049 BRANCH = format("stable/%s", release.name)
Mohammed Naser37694382024-04-02 21:11:31 -040050 PROJECT = "barbican"
51 BARBICAN_GIT_REF = release.ref
52 }
53}
54
55group "default" {
56 targets = [
57 "barbican"
58 ]
59}