Skip to content

Commit 3157542

Browse files
Build s390x and ppc64le architecture of kubectl plugin
1 parent 184b598 commit 3157542

File tree

2 files changed

+18
-10
lines changed

2 files changed

+18
-10
lines changed

.goreleaser.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ builds:
1414
goarch:
1515
- amd64
1616
- arm64
17+
- s390x
18+
- ppc64le
1719
hooks:
1820
# This will notarize Apple binaries and replace goreleaser bins with the notarized ones
1921
post:

scripts/release/kubectl-mongodb/python/build_kubectl_plugin.py

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,20 @@ def upload_artifacts_to_s3(s3_bucket: str, version: str):
6969

7070
uploaded_files = 0
7171
# iterate over all the files generated by goreleaser in the dist directory and upload them to S3
72-
for root, _, files in os.walk(GORELEASER_DIST_DIR):
73-
for filename in files:
74-
local_path = os.path.join(root, filename)
75-
s3_key = s3_path(local_path, version)
76-
77-
logger.info(f"Uploading artifact {local_path} to s3://{s3_bucket}/{s3_key}")
72+
for subdir in os.listdir(GORELEASER_DIST_DIR):
73+
subdir_path = os.path.join(GORELEASER_DIST_DIR, subdir)
74+
if not os.path.isdir(subdir_path):
75+
continue # not a directory
76+
77+
for filename in os.listdir(subdir_path):
78+
local_file_path = os.path.join(subdir_path, filename)
79+
if not os.path.isfile(local_file_path):
80+
continue
81+
82+
s3_key = s3_path(local_file_path, version)
83+
logger.info(f"Uploading artifact {local_file_path} to s3://{s3_bucket}/{s3_key}")
7884
try:
79-
s3_client.upload_file(local_path, s3_bucket, s3_key)
85+
s3_client.upload_file(local_file_path, s3_bucket, s3_key)
8086
logger.info(f"Successfully uploaded the artifact {filename}")
8187
uploaded_files += 1
8288
except Exception as e:
@@ -132,9 +138,9 @@ def main():
132138

133139
upload_artifacts_to_s3(kubectl_plugin_build_info.s3_store, kubectl_plugin_build_info.version)
134140

135-
download_plugin_for_tests_image(
136-
build_scenario, kubectl_plugin_build_info.s3_store, kubectl_plugin_build_info.version
137-
)
141+
# download_plugin_for_tests_image(
142+
# build_scenario, kubectl_plugin_build_info.s3_store, kubectl_plugin_build_info.version
143+
# )
138144

139145

140146
if __name__ == "__main__":

0 commit comments

Comments
 (0)