Skip to content

[MONGOCRYPT-838] Upload build artifacts to a restricted bucket on release branch builds#1126

Draft
vector-of-bool wants to merge 4 commits intomongodb:masterfrom
vector-of-bool:MONGOCRYPT-838-restricted-uploads.2
Draft

[MONGOCRYPT-838] Upload build artifacts to a restricted bucket on release branch builds#1126
vector-of-bool wants to merge 4 commits intomongodb:masterfrom
vector-of-bool:MONGOCRYPT-838-restricted-uploads.2

Conversation

@vector-of-bool
Copy link
Contributor

@vector-of-bool vector-of-bool commented Feb 12, 2026

Let's try this again. Refer: MONGOCRYPT-838

Summary

This changeset does the following:

  1. All S3 put operations now use permissions: private and visibility: signed.
  2. On any build that isn't in libmongocrypt-release or any build that is a patch, artifacts are transmitted in the mciuploads bucket using a less-restricted role for that bucket.
  3. On libmongocrypt-release commit or tag builds, artifacts are transmitted and posted in the cnd-origin-libmongocrypt bucket using a restricted role.

This change replaces all references to the mciuploads bucket in the CI
configuration file with a template expansion that conditionally refers to an
alternate bucket in certain scenarios. This templating also sets the role_arn
for S3 operations based on the same conditions.
@vector-of-bool
Copy link
Contributor Author

Need to be addressed: Some scripts still download (via HTTP) from the mciuploads buckets directly, specifically those related to the Python release. I think those can be updated separately as those tasks run on their own schedule and won't need updating until the next release.

@kevinAlbs
Copy link
Contributor

kevinAlbs commented Feb 13, 2026

Need to be addressed: Some scripts still download (via HTTP) from the mciuploads

I also expect the "publish packages" function also needs to update the URL. Possibly with an addition:

if "${project}" = 'libmongocrypt-release'; then
  package_url_prefix="https://downloads.mongodb.org"
else
  package_url_prefix="https://mciuploads.s3.amazonaws.com"
fi

That runs on every mainline commit. So I expect that would need to be updated before cherry-picking to avoid failures in the publish-packages tasks.

Copy link
Contributor

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a comment removal.

- command: s3.put
params:
role_arn: ${upload_arn}
# The upload of this component uses the less restricted bucket because it is only
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove out-dated comment since this was updated to use ${upload_bucket}.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants