|
2 | 2 | extends: |
3 | 3 | - .dind |
4 | 4 | - .default-retry |
5 | | - image: ghcr.io/code0-tech/build-images/reticulum-builder:207.1-ruby-3.2.2 |
| 5 | + tags: |
| 6 | + - c0-$PLATFORM |
| 7 | + image: ghcr.io/code0-tech/build-images/reticulum-builder:227.1-ruby-3.4.7-$PLATFORM |
6 | 8 | stage: container |
7 | | - variables: |
8 | | - PLATFORM_ARGS: "--platform linux/amd64,linux/arm64" |
9 | | - script: |
| 9 | + before_script: |
10 | 10 | - source support/helpers.sh |
11 | 11 | - docker_login |
12 | | - - docker_setup_multi_arch |
| 12 | + - docker_setup_builder |
13 | 13 | - 'image=$(echo "$CI_JOB_NAME" | cut -d : -f 2)' |
14 | 14 | - '[ -z "$NEED_PROJECT_DOWNLOAD" ] || download_project $image' |
15 | 15 | retry: |
|
19 | 19 | .single-image-build-base: |
20 | 20 | extends: |
21 | 21 | - .image-build-base |
| 22 | + parallel: |
| 23 | + matrix: |
| 24 | + - PLATFORM: |
| 25 | + - amd64 |
| 26 | + - arm64 |
22 | 27 | script: |
23 | | - - !reference [.image-build-base, script] |
24 | | - - build_image $image $CI_PIPELINE_ID "--push" |
| 28 | + - > |
| 29 | + build_image |
| 30 | + $image |
| 31 | + $CI_PIPELINE_ID |
| 32 | + "--output type=registry,push-by-digest=true --metadata-file manifest-${CI_JOB_ID}.json" |
| 33 | + "" |
| 34 | + artifacts: |
| 35 | + paths: |
| 36 | + - manifest-*.json |
| 37 | + expire_in: 1 day |
25 | 38 |
|
26 | 39 | .variant-image-build-base: |
27 | 40 | extends: |
28 | 41 | - .image-build-base |
29 | 42 | script: |
30 | | - - !reference [.image-build-base, script] |
31 | | - - build_image $image $CI_PIPELINE_ID "--build-arg VARIANT=$VARIANT --push" $(get_image_tag $CI_PIPELINE_ID $VARIANT) |
| 43 | + - > |
| 44 | + build_image |
| 45 | + $image |
| 46 | + $CI_PIPELINE_ID |
| 47 | + "--build-arg VARIANT=$VARIANT -output type=registry,push-by-digest=true --metadata-file manifest-${CI_JOB_ID}.json" |
| 48 | + "" |
| 49 | + artifacts: |
| 50 | + paths: |
| 51 | + - manifest-*.json |
| 52 | + expire_in: 1 day |
| 53 | + |
| 54 | +.manifest-create-base: |
| 55 | + extends: |
| 56 | + - .image-build-base |
| 57 | + variables: |
| 58 | + PLATFORM: amd64 |
| 59 | + script: |
| 60 | + - create_manifest $image $(get_image_tag $CI_PIPELINE_ID $VARIANT) |
32 | 61 |
|
33 | 62 | container:mise: |
34 | 63 | extends: |
35 | 64 | - .single-image-build-base |
36 | 65 |
|
| 66 | +manifest:mise: |
| 67 | + extends: |
| 68 | + - .manifest-create-base |
| 69 | + needs: |
| 70 | + - container:mise |
| 71 | + |
37 | 72 | container:rust: |
38 | 73 | extends: |
39 | 74 | - .single-image-build-base |
40 | 75 | needs: |
41 | | - - container:mise |
| 76 | + - manifest:mise |
| 77 | + |
| 78 | +manifest:rust: |
| 79 | + extends: |
| 80 | + - .manifest-create-base |
| 81 | + needs: |
| 82 | + - container:rust |
42 | 83 |
|
43 | 84 | container:aquila: |
44 | 85 | extends: |
45 | 86 | - .single-image-build-base |
46 | 87 | needs: |
47 | | - - container:rust |
| 88 | + - manifest:rust |
48 | 89 | variables: |
49 | 90 | NEED_PROJECT_DOWNLOAD: 'true' |
50 | 91 |
|
| 92 | +manifest:aquila: |
| 93 | + extends: |
| 94 | + - .manifest-create-base |
| 95 | + needs: |
| 96 | + - container:aquila |
| 97 | + |
51 | 98 | container:draco: |
52 | 99 | extends: |
53 | 100 | - .variant-image-build-base |
54 | 101 | needs: |
55 | | - - container:rust |
| 102 | + - manifest:rust |
56 | 103 | variables: |
57 | 104 | NEED_PROJECT_DOWNLOAD: 'true' |
58 | 105 | parallel: |
59 | 106 | matrix: |
60 | 107 | - VARIANT: |
61 | 108 | - rest |
| 109 | + PLATFORM: |
| 110 | + - amd64 |
| 111 | + - arm64 |
| 112 | + |
| 113 | +manifest:draco: |
| 114 | + extends: |
| 115 | + - .manifest-create-base |
| 116 | + parallel: |
| 117 | + matrix: |
| 118 | + - VARIANT: |
| 119 | + - rest |
| 120 | + needs: |
| 121 | + - job: container:draco |
| 122 | + parallel: |
| 123 | + matrix: |
| 124 | + - VARIANT: ['$[[ matrix.VARIANT ]]'] |
| 125 | + PLATFORM: |
| 126 | + - amd64 |
| 127 | + - arm64 |
62 | 128 |
|
63 | 129 | container:taurus: |
64 | 130 | extends: |
65 | 131 | - .single-image-build-base |
66 | 132 | needs: |
67 | | - - container:rust |
| 133 | + - manifest:rust |
68 | 134 | variables: |
69 | 135 | NEED_PROJECT_DOWNLOAD: 'true' |
70 | 136 |
|
| 137 | +manifest:taurus: |
| 138 | + extends: |
| 139 | + - .manifest-create-base |
| 140 | + needs: |
| 141 | + - container:taurus |
| 142 | + |
71 | 143 | container:ruby: |
72 | 144 | extends: |
73 | 145 | - .single-image-build-base |
74 | 146 | needs: |
75 | | - - container:mise |
| 147 | + - manifest:mise |
| 148 | + |
| 149 | +manifest:ruby: |
| 150 | + extends: |
| 151 | + - .manifest-create-base |
| 152 | + needs: |
| 153 | + - container:ruby |
76 | 154 |
|
77 | 155 | container:postgresql: |
78 | 156 | extends: |
79 | 157 | - .single-image-build-base |
80 | 158 | needs: |
81 | | - - container:mise |
| 159 | + - manifest:mise |
| 160 | + |
| 161 | +manifest:postgresql: |
| 162 | + extends: |
| 163 | + - .manifest-create-base |
| 164 | + needs: |
| 165 | + - container:postgresql |
82 | 166 |
|
83 | 167 | container:sagittarius: |
84 | 168 | extends: |
85 | 169 | - .variant-image-build-base |
86 | 170 | needs: |
87 | | - - container:ruby |
88 | | - - container:postgresql |
| 171 | + - manifest:ruby |
| 172 | + - manifest:postgresql |
89 | 173 | variables: |
90 | 174 | NEED_PROJECT_DOWNLOAD: 'true' |
91 | 175 | parallel: |
92 | 176 | matrix: |
93 | 177 | - VARIANT: |
94 | 178 | - ce |
95 | 179 | - ee |
| 180 | + PLATFORM: |
| 181 | + - amd64 |
| 182 | + - arm64 |
| 183 | + |
| 184 | +manifest:sagittarius: |
| 185 | + extends: |
| 186 | + - .manifest-create-base |
| 187 | + parallel: |
| 188 | + matrix: |
| 189 | + - VARIANT: |
| 190 | + - ce |
| 191 | + - ee |
| 192 | + needs: |
| 193 | + - job: container:sagittarius |
| 194 | + parallel: |
| 195 | + matrix: |
| 196 | + - VARIANT: [ '$[[ matrix.VARIANT ]]' ] |
| 197 | + PLATFORM: |
| 198 | + - amd64 |
| 199 | + - arm64 |
0 commit comments