Skip to content

Commit 652ee82

Browse files
CLOUDP-295785 - using build_info.json in new atomic pipeline (#317)
# Summary This PR focuses on using `build_info.json` information in `atomic_pipeline.py` code. The logic is mostly hidden in `image_build_config_from_args` function. It is binding the parts from: - #303 - atomic pipeline for building images - #307 - `build_info.json` with information for building images [Section in Atomic Releases TD](https://docs.google.com/document/d/1eJ8iKsI0libbpcJakGjxcPfbrTn8lmcZDbQH1UqMR_g/edit?tab=t.p76ry15gwmkk#heading=h.23xqxc1qypvb) that describes the `build_info.json` and how it is used in the image building process. - Added signing configuration in `build_info.json` - Added missing `meko-tests` and `mco-tests` images in `build_info.json` - Added configuration for `agent` and `ops-manager` images in `build_info.json` - Moved `images_signing.py` from `scripts/evergreen/release` - Simplifications in the existing code ## Proof of Work CI tests passing + updated unit tests ## Checklist - [ ] Have you linked a jira ticket and/or is the ticket in the title? - [ ] Have you checked whether your jira ticket required DOCSP changes? - [ ] Have you added changelog file? - use `skip-changelog` label if not needed - refer to [Changelog files and Release Notes](https://github.com/mongodb/mongodb-kubernetes/blob/master/CONTRIBUTING.md#changelog-files-and-release-notes) section in CONTRIBUTING.md for more details --------- Co-authored-by: Julien Benhaim <[email protected]>
1 parent c51b8ba commit 652ee82

21 files changed

+846
-557
lines changed

.evergreen.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,15 +423,15 @@ tasks:
423423
- func: build_multi_cluster_binary
424424
- func: pipeline
425425
vars:
426-
image_name: test
426+
image_name: meko-tests
427427

428428
- name: build_mco_test_image
429429
commands:
430430
- func: clone
431431
- func: setup_building_host
432432
- func: pipeline
433433
vars:
434-
image_name: mco-test
434+
image_name: mco-tests
435435

436436
- name: build_operator_ubi
437437
commands:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ precommit:
6060
@ .githooks/pre-commit
6161

6262
precommit-with-licenses:
63-
@ MDB_UPDATE_LICENSE=true .githooks/pre-commit
63+
@ MDB_UPDATE_LICENSES=true .githooks/pre-commit
6464

6565
switch:
6666
@ scripts/dev/switch_context.sh $(context) $(additional_override)

build_info.json

Lines changed: 109 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,94 @@
11
{
22
"images": {
3-
"mongodbOperator": {
3+
"operator": {
44
"patch": {
55
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/dev/mongodb-kubernetes",
66
"platforms": [
77
"linux/amd64"
88
]
99
},
1010
"staging": {
11-
"repository": "quay.io/mongodb/mongodb-kubernetes-stg",
11+
"sign": true,
12+
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-kubernetes",
1213
"platforms": [
1314
"linux/arm64",
1415
"linux/amd64"
1516
]
1617
},
1718
"release": {
19+
"sign": true,
1820
"repository": "quay.io/mongodb/mongodb-kubernetes",
1921
"platforms": [
2022
"linux/arm64",
2123
"linux/amd64"
2224
]
2325
}
2426
},
25-
"initDatabase": {
27+
"init-database": {
2628
"patch": {
2729
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/dev/mongodb-kubernetes-init-database",
2830
"platforms": [
2931
"linux/amd64"
3032
]
3133
},
3234
"staging": {
33-
"repository": "quay.io/mongodb/mongodb-kubernetes-init-database-stg",
35+
"sign": true,
36+
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-kubernetes-init-database",
3437
"platforms": [
3538
"linux/arm64",
3639
"linux/amd64"
3740
]
3841
},
3942
"release": {
43+
"sign": true,
4044
"repository": "quay.io/mongodb/mongodb-kubernetes-init-database",
4145
"platforms": [
4246
"linux/arm64",
4347
"linux/amd64"
4448
]
4549
}
4650
},
47-
"initAppDb": {
51+
"init-appdb": {
4852
"patch": {
4953
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/dev/mongodb-kubernetes-init-appdb",
5054
"platforms": [
5155
"linux/amd64"
5256
]
5357
},
5458
"staging": {
55-
"repository": "quay.io/mongodb/mongodb-kubernetes-init-appdb-stg",
59+
"sign": true,
60+
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-kubernetes-init-appdb",
5661
"platforms": [
5762
"linux/arm64",
5863
"linux/amd64"
5964
]
6065
},
6166
"release": {
67+
"sign": true,
6268
"repository": "quay.io/mongodb/mongodb-kubernetes-init-appdb",
6369
"platforms": [
6470
"linux/arm64",
6571
"linux/amd64"
6672
]
6773
}
6874
},
69-
"initOpsManager": {
75+
"init-ops-manager": {
7076
"patch": {
7177
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/dev/mongodb-kubernetes-init-ops-manager",
7278
"platforms": [
7379
"linux/amd64"
7480
]
7581
},
7682
"staging": {
77-
"repository": "quay.io/mongodb/mongodb-kubernetes-init-ops-manager-stg",
83+
"sign": true,
84+
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-kubernetes-init-ops-manager",
7885
"platforms": [
7986
"linux/arm64",
8087
"linux/amd64"
8188
]
8289
},
8390
"release": {
91+
"sign": true,
8492
"repository": "quay.io/mongodb/mongodb-kubernetes-init-ops-manager",
8593
"platforms": [
8694
"linux/arm64",
@@ -96,65 +104,148 @@
96104
]
97105
},
98106
"staging": {
99-
"repository": "quay.io/mongodb/mongodb-kubernetes-database-stg",
107+
"sign": true,
108+
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-kubernetes-database",
100109
"platforms": [
101110
"linux/arm64",
102111
"linux/amd64"
103112
]
104113
},
105114
"release": {
115+
"sign": true,
106116
"repository": "quay.io/mongodb/mongodb-kubernetes-database",
107117
"platforms": [
108118
"linux/arm64",
109119
"linux/amd64"
110120
]
111121
}
112122
},
113-
"readinessprobe": {
123+
"meko-tests": {
124+
"patch": {
125+
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/dev/mongodb-kubernetes-tests",
126+
"platforms": [
127+
"linux/amd64"
128+
]
129+
},
130+
"staging": {
131+
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-kubernetes-tests",
132+
"platforms": [
133+
"linux/amd64"
134+
]
135+
}
136+
},
137+
"mco-tests": {
138+
"patch": {
139+
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/dev/mongodb-community-tests",
140+
"platforms": [
141+
"linux/amd64"
142+
]
143+
},
144+
"staging": {
145+
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-community-tests",
146+
"platforms": [
147+
"linux/amd64"
148+
]
149+
}
150+
},
151+
"readiness-probe": {
114152
"patch": {
115153
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/dev/mongodb-kubernetes-readinessprobe",
116154
"platforms": [
117155
"linux/amd64"
118156
]
119157
},
120158
"staging": {
121-
"repository": "quay.io/mongodb/mongodb-kubernetes-readinessprobe-stg",
159+
"sign": true,
160+
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-kubernetes-readinessprobe",
122161
"platforms": [
123162
"linux/arm64",
124163
"linux/amd64"
125164
]
126165
},
127166
"release": {
128167
"version": "1.0.22",
168+
"sign": true,
129169
"repository": "quay.io/mongodb/mongodb-kubernetes-readinessprobe",
130170
"platforms": [
131171
"linux/arm64",
132172
"linux/amd64"
133173
]
134174
}
135175
},
136-
"operator-version-upgrade-post-start-hook": {
176+
"upgrade-hook": {
137177
"patch": {
138178
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/dev/mongodb-kubernetes-operator-version-upgrade-post-start-hook",
139179
"platforms": [
140180
"linux/amd64"
141181
]
142182
},
143183
"staging": {
144-
"repository": "quay.io/mongodb/mongodb-kubernetes-operator-version-upgrade-post-start-hook-stg",
184+
"sign": true,
185+
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-kubernetes-operator-version-upgrade-post-start-hook",
145186
"platforms": [
146187
"linux/arm64",
147188
"linux/amd64"
148189
]
149190
},
150191
"release": {
151192
"version": "1.0.9",
193+
"sign": true,
152194
"repository": "quay.io/mongodb/mongodb-kubernetes-operator-version-upgrade-post-start-hook",
153195
"platforms": [
154196
"linux/arm64",
155197
"linux/amd64"
156198
]
157199
}
200+
},
201+
"agent": {
202+
"patch": {
203+
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/dev/mongodb-agent-ubi",
204+
"platforms": [
205+
"linux/amd64"
206+
]
207+
},
208+
"staging": {
209+
"sign": true,
210+
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-agent-ubi",
211+
"platforms": [
212+
"linux/arm64",
213+
"linux/amd64"
214+
]
215+
},
216+
"release": {
217+
"sign": true,
218+
"repository": "quay.io/mongodb/mongodb-agent-ubi",
219+
"platforms": [
220+
"linux/arm64",
221+
"linux/amd64"
222+
]
223+
}
224+
},
225+
"ops-manager": {
226+
"patch": {
227+
"version": "om-version-from-release.json",
228+
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/dev/mongodb-enterprise-ops-manager",
229+
"platforms": [
230+
"linux/amd64"
231+
]
232+
},
233+
"staging": {
234+
"version": "om-version-from-release.json",
235+
"sign": true,
236+
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-enterprise-ops-manager",
237+
"platforms": [
238+
"linux/amd64"
239+
]
240+
},
241+
"release": {
242+
"version": "om-version-from-release.json",
243+
"sign": true,
244+
"repository": "quay.io/mongodb/mongodb-enterprise-ops-manager",
245+
"platforms": [
246+
"linux/amd64"
247+
]
248+
}
158249
}
159250
},
160251
"binaries": {
@@ -166,6 +257,7 @@
166257
]
167258
},
168259
"staging": {
260+
"sign": true,
169261
"s3-store": "s3://kubectl-mongodb/staging",
170262
"platforms": [
171263
"darwin/amd64",
@@ -175,6 +267,7 @@
175267
]
176268
},
177269
"release": {
270+
"sign": true,
178271
"s3-store": "s3://kubectl-mongodb/prod",
179272
"platforms": [
180273
"darwin/amd64",
@@ -191,9 +284,11 @@
191284
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/dev/helm-charts"
192285
},
193286
"staging": {
194-
"repository": "quay.io/mongodb/helm-charts-stg"
287+
"sign": true,
288+
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/helm-charts"
195289
},
196290
"release": {
291+
"sign": true,
197292
"repository": "quay.io/mongodb/helm-charts"
198293
}
199294
}

docker/mongodb-community-tests/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
#
77
# Ref: https://cryptography.io/en/latest/installation/#building-cryptography-on-linux
88
#
9-
ARG GOLANG_VERSION
10-
11-
FROM public.ecr.aws/docker/library/golang:${GOLANG_VERSION} as builder
9+
FROM public.ecr.aws/docker/library/golang:1.24 as builder
1210

1311
ENV GO111MODULE=on
1412
ENV GOPATH ""

pipeline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@
4646
get_supported_operator_versions,
4747
get_supported_version_for_image_matrix_handling,
4848
)
49-
from scripts.evergreen.release.images_signing import (
49+
from scripts.evergreen.release.sbom import generate_sbom, generate_sbom_for_cli
50+
from scripts.release.build.image_signing import (
5051
mongodb_artifactory_login,
5152
sign_image,
5253
verify_signature,
5354
)
54-
from scripts.evergreen.release.sbom import generate_sbom, generate_sbom_for_cli
5555

5656
TRACER = trace.get_tracer("evergreen-agent")
5757

pipeline_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
is_version_in_range,
1515
operator_build_configuration,
1616
)
17-
from scripts.evergreen.release.images_signing import run_command_with_retries
17+
from scripts.release.build.image_signing import run_command_with_retries
1818

1919
release_json = {
2020
"supportedImages": {

0 commit comments

Comments
 (0)