Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(IDX): upload artifacts with bazel run #4448

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Conversation

nmattia
Copy link
Contributor

@nmattia nmattia commented Mar 20, 2025

This moves the artifact upload out of the bazel build itself. This means the upload can be run with bazel run, reducing the need for injecting credentials into the build and allowing the upload to be re-run whenever necessary (and e.g. not cached by Bazel), also making the upload step a bit more declarative.

@nmattia nmattia force-pushed the nm-run-upload branch 3 times, most recently from 2c0b4f5 to 99e8cc6 Compare March 20, 2025 16:49
This moves the artifact upload out of the bazel build itself. This means
the upload can be run with `bazel run`, reducing the need for injecting
credentials into the build and allowing the upload to be re-run whenever
necessary (and e.g. not cached by Bazel), also making the upload step a
bit more declarative.
Copy link
Collaborator

@basvandijk basvandijk left a comment

Choose a reason for hiding this comment

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

I don't think I have anything to remark. Great stuff.

@nmattia nmattia marked this pull request as ready for review March 21, 2025 10:31
@nmattia nmattia requested a review from a team as a code owner March 21, 2025 10:31
@github-actions github-actions bot added the @idx label Mar 21, 2025
# Query for targets tagged with 'upload' which are expected to be run
# on release build (for uploading artifacts)
upload_targets=$(bazel query "attr(tags, '\\bupload\\b', //...)")
if [[ $RELEASE_BUILD == true ]]; then
Copy link
Member

Choose a reason for hiding this comment

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

Is this if needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep, definitely. What makes you pause?

Copy link
Contributor Author

@nmattia nmattia Mar 21, 2025

Choose a reason for hiding this comment

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

ah, I see what you mean. No it's not. Thanks! (copied it out of the upload script and didn't adapt)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually I now realize that I can't just move the upload out of the main.sh script. Will need to change a couple things for, so for now will move it back to main.sh. Good catch!

Co-authored-by: Marko Kosmerl <[email protected]>
@nmattia nmattia marked this pull request as draft March 21, 2025 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants