Mohammed Naser | 3769438 | 2024-04-02 21:11:31 -0400 | [diff] [blame] | 1 | variable "REGISTRY" { |
| 2 | default = "registry.atmosphere.dev/library" |
| 3 | } |
| 4 | |
| 5 | variable "CACHE_REGISTRY" { |
| 6 | default = "registry.atmosphere.dev/cache" |
| 7 | } |
| 8 | |
| 9 | variable "PUSH_TO_CACHE" { |
| 10 | default = false |
| 11 | } |
| 12 | |
| 13 | function "cache_from" { |
| 14 | params = [image] |
| 15 | result = ["type=registry,ref=${CACHE_REGISTRY}/${image}"] |
| 16 | } |
| 17 | |
| 18 | function "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 Naser | 3769438 | 2024-04-02 21:11:31 -0400 | [diff] [blame] | 23 | target "barbican" { |
| 24 | name = "barbican-${release.tgt}" |
Mohammed Naser | 682ba51 | 2024-04-03 13:56:18 -0400 | [diff] [blame] | 25 | |
| 26 | context = "." |
| 27 | target = "barbican" |
Mohammed Naser | 3769438 | 2024-04-02 21:11:31 -0400 | [diff] [blame] | 28 | |
| 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 Naser | 3769438 | 2024-04-02 21:11:31 -0400 | [diff] [blame] | 47 | args = { |
| 48 | RELEASE = release.name |
Mohammed Naser | 682ba51 | 2024-04-03 13:56:18 -0400 | [diff] [blame] | 49 | BRANCH = format("stable/%s", release.name) |
Mohammed Naser | 3769438 | 2024-04-02 21:11:31 -0400 | [diff] [blame] | 50 | PROJECT = "barbican" |
| 51 | BARBICAN_GIT_REF = release.ref |
| 52 | } |
| 53 | } |
| 54 | |
Mohammed Naser | ee1ff23 | 2024-04-05 13:52:18 -0400 | [diff] [blame] | 55 | target "magnum" { |
| 56 | name = "magnum-${release.tgt}" |
| 57 | |
| 58 | context = "." |
| 59 | target = "magnum" |
| 60 | |
| 61 | cache-from = cache_from("magnum:${release.name}") |
| 62 | cache-to = cache_to("magnum:${release.name}") |
| 63 | |
| 64 | tags = [ |
| 65 | "${REGISTRY}/magnum:${release.name}", |
| 66 | "${REGISTRY}/magnum:${release.ref}" |
| 67 | ] |
| 68 | |
| 69 | matrix = { |
| 70 | release = [ |
| 71 | { |
| 72 | tgt = "zed", |
| 73 | name = "zed", |
| 74 | ref = "0ee979099a01ae2c8b1b5d6757897a8993e4e34c" |
| 75 | }, |
| 76 | { |
| 77 | tgt = "bobcat", |
| 78 | name = "2023.2", |
| 79 | ref = "5f921a72d22d7e96fb3584c4906a39de9a085a41" |
| 80 | } |
| 81 | ] |
| 82 | } |
| 83 | |
| 84 | args = { |
| 85 | RELEASE = release.name |
| 86 | BRANCH = format("stable/%s", release.name) |
| 87 | PROJECT = "magnum" |
| 88 | MAGNUM_GIT_REF = release.ref |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | |
Mohammed Naser | 3769438 | 2024-04-02 21:11:31 -0400 | [diff] [blame] | 93 | group "default" { |
| 94 | targets = [ |
Mohammed Naser | ee1ff23 | 2024-04-05 13:52:18 -0400 | [diff] [blame] | 95 | "barbican", |
| 96 | "magnum" |
Mohammed Naser | 3769438 | 2024-04-02 21:11:31 -0400 | [diff] [blame] | 97 | ] |
| 98 | } |