Skip to content

Commit 777b7c2

Browse files
committed
pre-release wip
1 parent 16a7656 commit 777b7c2

File tree

16 files changed

+288
-60
lines changed

16 files changed

+288
-60
lines changed

.evergreen-functions.yml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,18 +225,32 @@ functions:
225225
working_dir: src/github.com/mongodb/mongodb-kubernetes
226226
binary: scripts/evergreen/setup_docker_sbom.sh
227227

228-
helm_registry_login:
228+
helm_registry_login_prod: &helm_registry_login_prod
229+
command: subprocess.exec
230+
type: setup
231+
retry_on_failure: true
232+
params:
233+
working_dir: src/github.com/mongodb/mongodb-kubernetes
234+
add_to_path:
235+
- ${workdir}/bin
236+
- ${PROJECT_DIR}/bin
237+
env:
238+
QUAY_USERNAME: ${quay_prod_username}
239+
QUAY_PASSWORD: ${quay_prod_robot_token}
240+
binary: scripts/release/helm_registry_login.sh
241+
242+
helm_registry_login_staging: &helm_registry_login_staging
229243
command: subprocess.exec
230244
type: setup
231245
retry_on_failure: true
232246
params:
233247
working_dir: src/github.com/mongodb/mongodb-kubernetes
234-
include_expansions_in_env:
235-
- quay_prod_username
236-
- quay_prod_robot_token
237248
add_to_path:
238249
- ${workdir}/bin
239250
- ${PROJECT_DIR}/bin
251+
env:
252+
QUAY_USERNAME: ${quay_staging_username}
253+
QUAY_PASSWORD: ${quay_staging_robot_token}
240254
binary: scripts/release/helm_registry_login.sh
241255

242256
# Logs into all used registries
@@ -374,6 +388,13 @@ functions:
374388
params:
375389
command: "docker login quay.io -u ${quay_prod_username} -p ${quay_prod_robot_token}"
376390

391+
quay_staging_login:
392+
- command: subprocess.exec
393+
type: setup
394+
retry_on_failure: true
395+
params:
396+
command: "docker login quay.io -u ${quay_staging_username} -p ${quay_staging_robot_token}"
397+
377398
setup_cloud_qa:
378399
- command: shell.exec
379400
type: setup

.evergreen-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ tasks:
123123
- func: python_venv
124124
- func: setup_kubectl
125125
- func: setup_aws
126-
- func: helm_registry_login
126+
- func: helm_registry_login_prod
127127
- func: publish_helm_chart
128128

129129
### Release build variants

.evergreen.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,7 @@ tasks:
388388
- func: download_multi_cluster_binary
389389
vars:
390390
platform: linux/amd64
391+
- func: quay_staging_login
391392
- func: pipeline
392393
vars:
393394
image_name: meko-tests
@@ -399,6 +400,7 @@ tasks:
399400
- func: download_multi_cluster_binary
400401
vars:
401402
platform: linux/arm64
403+
- func: quay_staging_login
402404
- func: pipeline
403405
vars:
404406
image_name: meko-tests-arm64
@@ -412,6 +414,7 @@ tasks:
412414
- func: download_multi_cluster_binary
413415
vars:
414416
platform: linux/s390x
417+
- func: quay_staging_login
415418
- func: pipeline
416419
vars:
417420
image_name: meko-tests-ibm-z
@@ -425,6 +428,7 @@ tasks:
425428
- func: download_multi_cluster_binary
426429
vars:
427430
platform: linux/ppc64le
431+
- func: quay_staging_login
428432
- func: pipeline
429433
vars:
430434
image_name: meko-tests-ibm-power
@@ -433,6 +437,7 @@ tasks:
433437
commands:
434438
- func: clone
435439
- func: setup_building_host
440+
- func: quay_staging_login
436441
- func: pipeline
437442
vars:
438443
image_name: mco-tests
@@ -441,6 +446,7 @@ tasks:
441446
commands:
442447
- func: clone
443448
- func: setup_building_host
449+
- func: quay_staging_login
444450
- func: pipeline
445451
vars:
446452
image_name: operator
@@ -449,6 +455,7 @@ tasks:
449455
commands:
450456
- func: clone
451457
- func: setup_building_host
458+
- func: quay_staging_login
452459
- func: pipeline
453460
vars:
454461
image_name: operator-race
@@ -457,6 +464,7 @@ tasks:
457464
commands:
458465
- func: clone
459466
- func: setup_building_host
467+
- func: quay_staging_login
460468
- func: pipeline
461469
vars:
462470
image_name: init-ops-manager
@@ -465,7 +473,7 @@ tasks:
465473
commands:
466474
- func: clone
467475
- func: setup_building_host
468-
- func: quay_login
476+
- func: quay_staging_login
469477
- func: pipeline
470478
vars:
471479
image_name: agent
@@ -476,6 +484,7 @@ tasks:
476484
commands:
477485
- func: clone
478486
- func: setup_building_host
487+
- func: quay_staging_login
479488
- func: pipeline
480489
vars:
481490
image_name: init-database
@@ -484,6 +493,7 @@ tasks:
484493
commands:
485494
- func: clone
486495
- func: setup_building_host
496+
- func: quay_staging_login
487497
- func: pipeline
488498
vars:
489499
image_name: database
@@ -492,6 +502,7 @@ tasks:
492502
commands:
493503
- func: clone
494504
- func: setup_building_host
505+
- func: quay_staging_login
495506
- func: pipeline
496507
vars:
497508
image_name: readiness-probe
@@ -500,6 +511,7 @@ tasks:
500511
commands:
501512
- func: clone
502513
- func: setup_building_host
514+
- func: quay_staging_login
503515
- func: pipeline
504516
vars:
505517
image_name: upgrade-hook
@@ -511,7 +523,7 @@ tasks:
511523
- func: setup_kubectl
512524
- func: setup_aws
513525
- func: prepare_aws
514-
- func: helm_registry_login
526+
- func: helm_registry_login_staging
515527
- func: publish_helm_chart
516528

517529
- name: prepare_aws
@@ -554,6 +566,7 @@ tasks:
554566
- func: clone
555567
- func: switch_context
556568
- func: setup_building_host
569+
- func: quay_staging_login
557570
- func: pipeline
558571
vars:
559572
image_name: ops-manager

build_info.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"sign": true,
1313
"latest-tag": true,
1414
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-kubernetes",
15+
"secondary-repositories": ["quay.io/mongodb/staging/mongodb-kubernetes"],
1516
"platforms": [
1617
"linux/arm64",
1718
"linux/amd64",
@@ -43,6 +44,7 @@
4344
"staging": {
4445
"sign": true,
4546
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-kubernetes",
47+
"secondary-repositories": ["quay.io/mongodb/staging/mongodb-kubernetes"],
4648
"platforms": [
4749
"linux/amd64"
4850
]
@@ -60,6 +62,7 @@
6062
"sign": true,
6163
"latest-tag": true,
6264
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-kubernetes-init-database",
65+
"secondary-repositories": ["quay.io/mongodb/staging/mongodb-kubernetes-init-database"],
6366
"platforms": [
6467
"linux/arm64",
6568
"linux/amd64",
@@ -92,6 +95,7 @@
9295
"sign": true,
9396
"latest-tag": true,
9497
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-kubernetes-init-ops-manager",
98+
"secondary-repositories": ["quay.io/mongodb/staging/mongodb-kubernetes-init-ops-manager"],
9599
"platforms": [
96100
"linux/amd64"
97101
]
@@ -118,6 +122,7 @@
118122
"sign": true,
119123
"latest-tag": true,
120124
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-kubernetes-database",
125+
"secondary-repositories": ["quay.io/mongodb/staging/mongodb-kubernetes-database"],
121126
"platforms": [
122127
"linux/arm64",
123128
"linux/amd64",
@@ -148,6 +153,7 @@
148153
},
149154
"staging": {
150155
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-kubernetes-tests",
156+
"secondary-repositories": ["quay.io/mongodb/staging/mongodb-kubernetes-tests"],
151157
"platforms": [
152158
"linux/amd64"
153159
]
@@ -170,6 +176,7 @@
170176
},
171177
"staging": {
172178
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-kubernetes-tests",
179+
"secondary-repositories": ["quay.io/mongodb/staging/mongodb-kubernetes-tests"],
173180
"platforms": [
174181
"linux/arm64"
175182
],
@@ -195,6 +202,7 @@
195202
},
196203
"staging": {
197204
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-kubernetes-tests",
205+
"secondary-repositories": ["quay.io/mongodb/staging/mongodb-kubernetes-tests"],
198206
"platforms": [
199207
"linux/s390x"
200208
],
@@ -220,6 +228,7 @@
220228
},
221229
"staging": {
222230
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-kubernetes-tests",
231+
"secondary-repositories": ["quay.io/mongodb/staging/mongodb-kubernetes-tests"],
223232
"platforms": [
224233
"linux/ppc64le"
225234
],
@@ -243,6 +252,7 @@
243252
},
244253
"staging": {
245254
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-community-tests",
255+
"secondary-repositories": ["quay.io/mongodb/staging/mongodb-community-tests"],
246256
"platforms": [
247257
"linux/amd64"
248258
]
@@ -260,6 +270,7 @@
260270
"sign": true,
261271
"latest-tag": true,
262272
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-kubernetes-readinessprobe",
273+
"secondary-repositories": ["quay.io/mongodb/staging/mongodb-kubernetes-readinessprobe"],
263274
"platforms": [
264275
"linux/arm64",
265276
"linux/amd64"
@@ -288,6 +299,7 @@
288299
"sign": true,
289300
"latest-tag": true,
290301
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-kubernetes-operator-version-upgrade-post-start-hook",
302+
"secondary-repositories": ["quay.io/mongodb/staging/mongodb-kubernetes-operator-version-upgrade-post-start-hook"],
291303
"platforms": [
292304
"linux/arm64",
293305
"linux/amd64"
@@ -317,6 +329,7 @@
317329
"sign": true,
318330
"skip-if-exists": true,
319331
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-agent",
332+
"secondary-repositories": ["quay.io/mongodb/staging/mongodb-agent"],
320333
"platforms": [
321334
"linux/arm64",
322335
"linux/amd64",
@@ -351,6 +364,7 @@
351364
"sign": true,
352365
"skip-if-exists": true,
353366
"repository": "268558157000.dkr.ecr.us-east-1.amazonaws.com/staging/mongodb-enterprise-ops-manager-ubi",
367+
"secondary-repositories": ["quay.io/mongodb/staging/mongodb-enterprise-ops-manager-ubi"],
354368
"platforms": [
355369
"linux/amd64"
356370
]
@@ -411,6 +425,7 @@
411425
"sign": true,
412426
"version-prefix": "0.0.0+",
413427
"registry": "268558157000.dkr.ecr.us-east-1.amazonaws.com",
428+
"secondary-repositories": ["quay.io/mongodb/staging/helm-charts"],
414429
"region": "us-east-1",
415430
"repository": "staging/mongodb/helm-charts"
416431
},

docker/mongodb-kubernetes-tests/pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ addopts = -x -rA -v -l --color=yes --setup-show --junitxml=/tmp/results/myreport
1717
# Logging configuration
1818
# Logs printed right away instead of captured
1919
log_cli = 1
20-
log_cli_level = DEBUG
20+
log_cli_level = INFO
2121
log_cli_format = %(asctime)s [%(levelname)-8s] [%(name)s] %(message)s
2222
log_cli_date_format = %H:%M:%S
2323

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
helm upgrade --install --debug --kube-context "${K8S_CTX}" \
22
--create-namespace \
33
--namespace="${MDB_NS}" \
4-
mongodb-kubernetes \
4+
mongodb-kubernetes-operator \
55
${OPERATOR_ADDITIONAL_HELM_VALUES:+--set ${OPERATOR_ADDITIONAL_HELM_VALUES}} \
66
"${OPERATOR_HELM_CHART}"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
helm upgrade --install --debug --kube-context "${K8S_CTX}" \
22
--create-namespace \
33
--namespace="${MDB_NS}" \
4-
mongodb-kubernetes \
4+
mongodb-kubernetes-operator \
55
${OPERATOR_ADDITIONAL_HELM_VALUES:+--set ${OPERATOR_ADDITIONAL_HELM_VALUES}} \
66
"${OPERATOR_HELM_CHART}"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
helm upgrade --install --debug --kube-context "${K8S_CTX}" \
22
--create-namespace \
33
--namespace="${MDB_NS}" \
4-
mongodb-kubernetes \
4+
mongodb-kubernetes-operator \
55
${OPERATOR_ADDITIONAL_HELM_VALUES:+--set ${OPERATOR_ADDITIONAL_HELM_VALUES}} \
66
"${OPERATOR_HELM_CHART}"

scripts/dev/configure_container_auth.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ if [[ -f "${CONFIG_PATH}" ]]; then
133133

134134
if [[ "${http_status}" != "401" && "${http_status}" != "403" && "${http_status}" != "error/timeout" ]]; then
135135
echo "Container registry credentials are up to date - not performing the new login!"
136-
exit
136+
# exit
137137
fi
138138
echo "Container login required (HTTP status: ${http_status})"
139139
else

scripts/funcs/kubernetes

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,10 @@ create_image_registries_secret() {
138138
echo "Using Docker config: ${config_file}"
139139
fi
140140

141-
if kubectl --context "${context}" get secret "${secret_name}" -n "${namespace}" &>/dev/null; then
142-
echo "${context}: Secret ${namespace}/${secret_name} already exists, skipping"
143-
return
144-
fi
141+
# if kubectl --context "${context}" get secret "${secret_name}" -n "${namespace}" &>/dev/null; then
142+
# echo "${context}: Secret ${namespace}/${secret_name} already exists, skipping"
143+
# return
144+
# fi
145145

146146
# shellcheck disable=SC2154
147147
if kubectl --context "${context}" get namespace "${namespace}"; then

0 commit comments

Comments
 (0)