Skip to content

Commit be74756

Browse files
committed
CLOUDP-295785 - Fix multi-arch builds by migrating away from goreleaser
1 parent f214fc8 commit be74756

26 files changed

+643
-843
lines changed

.evergreen-functions.yml

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -507,21 +507,18 @@ functions:
507507
params:
508508
working_dir: src/github.com/mongodb/mongodb-kubernetes
509509
binary: scripts/release/publish_helm_chart.sh
510-
510+
511511
build_multi_cluster_binary:
512512
- command: subprocess.exec
513513
params:
514514
working_dir: src/github.com/mongodb/mongodb-kubernetes
515-
binary: scripts/dev/run_python.sh scripts/release/kubectl_mongodb/python/build_kubectl_plugin.py
516-
517-
build_and_push_appdb_database:
515+
binary: scripts/release/kubectl_mongodb/build_kubectl_plugin.sh
516+
517+
download_multi_cluster_binary:
518518
- command: subprocess.exec
519519
params:
520-
working_dir: src/github.com/mongodb/mongodb-kubernetes/docker/mongodb-kubernetes-appdb-database
521-
binary: ./build_and_push_appdb_database_images.sh
522-
add_to_path:
523-
- ${workdir}/bin
524-
- ${workdir}
520+
working_dir: src/github.com/mongodb/mongodb-kubernetes
521+
binary: scripts/release/kubectl_mongodb/download_kubectl_plugin.sh
525522

526523
build_test_image_ibm:
527524
- command: subprocess.exec
@@ -839,22 +836,6 @@ functions:
839836
script: |
840837
./scripts/code_snippets/tests/${task_name}
841838
842-
#
843-
# kubectl mongodb plugin release functions
844-
#
845-
install_goreleaser:
846-
- command: shell.exec
847-
type: setup
848-
include_expansions_in_env:
849-
- goreleaser_pro_tar_gz
850-
params:
851-
script: |
852-
set -Eeu pipefail
853-
curl -fL "${goreleaser_pro_tar_gz}" --output goreleaser_Linux_x86_64.tar.gz
854-
tar -xf goreleaser_Linux_x86_64.tar.gz
855-
chmod 755 ./goreleaser
856-
sudo cp goreleaser /usr/local/bin/
857-
858839
install_macos_notarization_service:
859840
- command: shell.exec
860841
type: setup
@@ -889,7 +870,7 @@ functions:
889870
- command: github.generate_token
890871
params:
891872
expansion_name: GH_TOKEN
892-
- command: shell.exec
873+
- command: subprocess.exec
893874
type: setup
894875
params:
895876
working_dir: src/github.com/mongodb/mongodb-kubernetes
@@ -906,10 +887,7 @@ functions:
906887
- triggered_by_git_tag
907888
- OPERATOR_VERSION
908889
env:
909-
XDG_CONFIG_HOME: ${go_base_path}${workdir}
910-
GO111MODULE: "on"
911-
GOROOT: "/opt/golang/go1.24"
912890
MACOS_NOTARY_KEY: ${macos_notary_keyid}
913891
MACOS_NOTARY_SECRET: ${macos_notary_secret}
914892
GH_TOKEN: ${GH_TOKEN}
915-
script: scripts/dev/run_python.sh scripts/release/kubectl_mongodb/python/promote_kubectl_plugin.py
893+
binary: scripts/dev/run_python.sh scripts/release/kubectl_mongodb/promote_kubectl_plugin.py

.evergreen-release.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ tasks:
99
commands:
1010
- func: clone
1111
- func: setup_building_host
12-
- func: build_multi_cluster_binary
12+
- func: download_multi_cluster_binary
1313
- func: pipeline
1414
vars:
1515
IMAGE_NAME: meko-tests
@@ -119,11 +119,10 @@ tasks:
119119
tags: [ "binary_release" ]
120120
commands:
121121
- func: clone
122-
- func: install_goreleaser
123-
- func: install_macos_notarization_service
124122
- func: python_venv
123+
- func: install_macos_notarization_service
125124
- func: release_kubectl_mongodb_plugin
126-
125+
127126
- name: create_chart_release_pr
128127
tags: [ "helm_chart_release_pr" ]
129128
commands:
@@ -210,6 +209,9 @@ buildvariants:
210209
allowed_requesters: [ "patch", "github_tag" ]
211210
run_on:
212211
- release-ubuntu2404-small # This is required for CISA attestation https://jira.mongodb.org/browse/DEVPROD-17780
212+
depends_on:
213+
- name: release_kubectl_mongodb_plugin
214+
variant: release_kubectl_mongodb_plugin
213215
tasks:
214216
- name: build_test_image_for_smoke_tests
215217

.evergreen.yml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ variables:
8282
- func: clone
8383
- func: switch_context
8484
- func: setup_building_host_minikube
85-
- func: install_goreleaser
86-
- func: build_multi_cluster_binary
8785

8886
- &setup_group_multi_cluster
8987
setup_group_can_fail_task: true
@@ -92,8 +90,6 @@ variables:
9290
- func: download_kube_tools
9391
- func: switch_context
9492
- func: setup_building_host
95-
- func: install_goreleaser
96-
- func: build_multi_cluster_binary
9793

9894
- &setup_and_teardown_task_cloudqa
9995
setup_task_can_fail_task: true
@@ -344,12 +340,17 @@ tasks:
344340
vars:
345341
FLAGS: "--current-agents --skip-if-exists=false"
346342

347-
- name: build_test_image
343+
- name: build_kubectl_mongodb_plugin
348344
commands:
349345
- func: clone
350346
- func: setup_building_host
351-
- func: install_goreleaser
352347
- func: build_multi_cluster_binary
348+
349+
- name: build_test_image
350+
commands:
351+
- func: clone
352+
- func: setup_building_host
353+
- func: download_multi_cluster_binary
353354
- func: pipeline
354355
vars:
355356
IMAGE_NAME: meko-tests
@@ -358,13 +359,11 @@ tasks:
358359
commands:
359360
- func: clone
360361
- func: setup_building_host
361-
- func: install_goreleaser
362-
- func: build_multi_cluster_binary
362+
- func: download_multi_cluster_binary
363363
- func: pipeline
364364
vars:
365365
IMAGE_NAME: meko-tests-arm64
366366

367-
368367
- name: build_test_image_ibm
369368
commands:
370369
- func: clone
@@ -377,8 +376,7 @@ tasks:
377376
add_to_path:
378377
- ${workdir}/bin
379378
command: scripts/evergreen/setup_minikube_host.sh
380-
- func: install_goreleaser
381-
- func: build_multi_cluster_binary
379+
- func: download_multi_cluster_binary
382380
- func: build_test_image_ibm
383381

384382
- name: build_mco_test_image
@@ -1495,9 +1493,6 @@ buildvariants:
14951493
variant: init_test_run
14961494
- name: build_test_image_arm
14971495
variant: init_test_run_arm
1498-
# TODO: Re-enable when staging is added to pipeline
1499-
# https://jira.mongodb.org/browse/CLOUDP-349096
1500-
disable: true
15011496
tasks:
15021497
- name: e2e_smoke_arm_task_group
15031498

@@ -1514,9 +1509,6 @@ buildvariants:
15141509
variant: init_test_run
15151510
- name: build_test_image_arm
15161511
variant: init_test_run_arm
1517-
# TODO: Re-enable when staging is added to pipeline
1518-
# https://jira.mongodb.org/browse/CLOUDP-349096
1519-
disable: true
15201512
tasks:
15211513
- name: e2e_smoke_arm_task_group
15221514

@@ -1712,6 +1704,8 @@ buildvariants:
17121704
- name: build_operator_ubi
17131705
- name: build_operator_race_ubi
17141706
- name: build_test_image
1707+
depends_on:
1708+
- name: build_kubectl_mongodb_plugin
17151709
- name: build_mco_test_image
17161710
- name: build_init_appdb_images_ubi
17171711
- name: build_init_om_images_ubi
@@ -1720,6 +1714,7 @@ buildvariants:
17201714
- name: build_agent_images_ubi
17211715
- name: build_readiness_probe_image
17221716
- name: build_version_upgrade_hook_image
1717+
- name: build_kubectl_mongodb_plugin
17231718
- name: prepare_aws
17241719
- name: publish_helm_chart
17251720

@@ -1746,6 +1741,9 @@ buildvariants:
17461741
run_on:
17471742
- rhel9-zseries-small
17481743
- rhel9-zseries-large
1744+
depends_on:
1745+
- name: build_kubectl_mongodb_plugin
1746+
variant: init_test_run
17491747
tasks:
17501748
- name: build_test_image_ibm
17511749

@@ -1755,6 +1753,9 @@ buildvariants:
17551753
tags: [ "staging" ]
17561754
run_on:
17571755
- ubuntu2204-arm64-small
1756+
depends_on:
1757+
- name: build_kubectl_mongodb_plugin
1758+
variant: init_test_run
17581759
tasks:
17591760
- name: build_test_image_arm
17601761

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ logs-debug/
8989
docs/**/log/*
9090
docs/**/test.sh.run.log
9191

92-
# goreleaser generated files
93-
dist
9492
logs
9593
*.run.log
9694

.goreleaser.yaml

Lines changed: 0 additions & 55 deletions
This file was deleted.

Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ build-and-push-operator-image: aws_login
159159
build-and-push-database-image: aws_login
160160
@ scripts/dev/build_push_database_image
161161

162-
build-and-push-test-image: aws_login build-multi-cluster-binary
162+
build-and-push-test-image: aws_login
163163
@ if [[ -z "$(local)" ]]; then \
164164
scripts/dev/run_python.sh scripts/release/pipeline.py test; \
165165
fi
@@ -169,9 +169,6 @@ build-and-push-mco-test-image: aws_login
169169
scripts/dev/run_python.sh scripts/release/pipeline.py mco-test; \
170170
fi
171171

172-
build-multi-cluster-binary:
173-
scripts/evergreen/build_multi_cluster_kubeconfig_creator.sh
174-
175172
# builds all app images in parallel
176173
# note that we cannot build both appdb and database init images in parallel as they change the same docker file
177174
build-and-push-images: build-and-push-operator-image appdb-init-image om-init-image database operator-image database-init-image

build_info.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -355,13 +355,14 @@
355355
]
356356
},
357357
"staging": {
358-
"sign": false,
359358
"s3-store": "mongodb-kubernetes-staging",
360359
"platforms": [
361360
"darwin/amd64",
362361
"darwin/arm64",
363362
"linux/amd64",
364-
"linux/arm64"
363+
"linux/arm64",
364+
"linux/s390x",
365+
"linux/ppc64le"
365366
]
366367
},
367368
"release": {
@@ -371,7 +372,9 @@
371372
"darwin/amd64",
372373
"darwin/arm64",
373374
"linux/amd64",
374-
"linux/arm64"
375+
"linux/arm64",
376+
"linux/s390x",
377+
"linux/ppc64le"
375378
]
376379
}
377380
}

scripts/evergreen/build_multi_cluster_kubeconfig_creator.sh

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)