-
Notifications
You must be signed in to change notification settings - Fork 339
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
base: master
Are you sure you want to change the base?
Conversation
2c0b4f5
to
99e8cc6
Compare
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.
There was a problem hiding this 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.
# 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this if
needed?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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]>
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.