-
Notifications
You must be signed in to change notification settings - Fork 128
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: Runfile and java artifact support for Bazel Builder #2362
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enteraga6
requested review from
asraa,
ianlewis,
laurentsimon and
joshuagl
as code owners
July 7, 2023 21:32
Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Fixes getting the filename from the result of `npm pack --json`. Some older versions return the incorrect file name. This change falls back and attempts to determine the filename if the file is not initially found. Fixes slsa-framework#2290 slsa-framework#2294 slsa-framework#2295 slsa-framework#2296 slsa-framework#2297 slsa-framework#2298 slsa-framework#2299 Signed-off-by: Ian Lewis <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
This installs the instance of npm used for publish in a temporary directory rather than polluting the user job global npm modules. --------- Signed-off-by: Ian Lewis <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Fixes slsa-framework#2311 Add a `secure-package-download` action so that users can more easily download a tgz artifact built by the Node.js builder. Signed-off-by: Ian Lewis <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
| Package | Type | Update | Change | |---|---|---|---| | [github.com/coreos/go-oidc/v3](https://togithub.com/coreos/go-oidc) | require | minor | `v3.5.0` -> `v3.6.0` | | [github.com/go-openapi/swag](https://togithub.com/go-openapi/swag) | require | patch | `v0.22.3` -> `v0.22.4` | | [github.com/sigstore/rekor](https://togithub.com/sigstore/rekor) | require | patch | `v1.2.0` -> `v1.2.1` | | golang.org/x/oauth2 | require | minor | `v0.8.0` -> `v0.9.0` | --------- Signed-off-by: Ian Lewis <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: Ian Lewis <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: laurentsimon <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: Noah Elzner <[email protected]>
Signed-off-by: Noah Elzner <[email protected]>
laurentsimon
reviewed
Jul 7, 2023
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.
There seems to be changes to files that are out of scope of the PR. Is it a git / merge problem?
Signed-off-by: Noah Elzner <[email protected]>
Yes, everything is synced up with the main branch now after resolving the conflicts. Sorry about that. |
enteraga6
changed the title
Runfile and Java Artifact Support
Feat: Runfile and java artifact support for Bazel Builder
Jul 8, 2023
enteraga6
changed the title
Feat: Runfile and java artifact support for Bazel Builder
feat: Runfile and java artifact support for Bazel Builder
Jul 8, 2023
closes #2332 |
ianlewis
approved these changes
Jul 11, 2023
enteraga6
added a commit
to enteraga6/slsa-github-generator
that referenced
this pull request
Jul 18, 2023
…work#2362) cc: @mihaimaruseac This will provide support for artifacts that also need runfiles. Users can use a flag, `needs-runfiles`, to also package the artifact alongside the runfiles Bazel generates if the user deems it as necessary. Also, support for Java artifacts is made available by packaging the JARs to be standalone through a format in Bazel called `_deploy.jar`. Alongside the `_deploy.jar`, there will be a modified `run-script` that allows the users that download the artifact to run the run-script by using a flag called `local_javabin`, where they put the path to their own java bin such that it is utilized by the run-script. This run-script is generated by Bazel from a template and later modified in the `build.sh` in the internal part of the builder to add this flag for the users. More information is available on the readme. Java targets will automatically be converted to their `_deploy.jar` with this. Three flags are used for users that have java targets: `includes-java`: if true then adds an additional flag to build command as well as rule for local java repo in WORKSPACE in order to utilize the `--singlejar` capability of run-script for `_deploy.jar` such that the remote jdk does not need to be included in runfiles. Doing it like this prevents massive bloat when attesting. `user-java-distribution` and `user-java-version`: let the user specify the exact java they want to use to build When users run the run-script they will include an additional flag `local_javabin` which they will set to their local javabin that the run-script will utilize to run the `_deploy.jar` A combination of `bazel query` and `bazel cquery` were used to resolved edge cases with the implementation. --------- Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Ian Lewis <[email protected]> Signed-off-by: laurentsimon <[email protected]> Signed-off-by: laurentsimon <[email protected]> Co-authored-by: Ian Lewis <[email protected]> Co-authored-by: laurentsimon <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
enteraga6
added a commit
to enteraga6/slsa-github-generator
that referenced
this pull request
Aug 8, 2023
…work#2362) cc: @mihaimaruseac This will provide support for artifacts that also need runfiles. Users can use a flag, `needs-runfiles`, to also package the artifact alongside the runfiles Bazel generates if the user deems it as necessary. Also, support for Java artifacts is made available by packaging the JARs to be standalone through a format in Bazel called `_deploy.jar`. Alongside the `_deploy.jar`, there will be a modified `run-script` that allows the users that download the artifact to run the run-script by using a flag called `local_javabin`, where they put the path to their own java bin such that it is utilized by the run-script. This run-script is generated by Bazel from a template and later modified in the `build.sh` in the internal part of the builder to add this flag for the users. More information is available on the readme. Java targets will automatically be converted to their `_deploy.jar` with this. Three flags are used for users that have java targets: `includes-java`: if true then adds an additional flag to build command as well as rule for local java repo in WORKSPACE in order to utilize the `--singlejar` capability of run-script for `_deploy.jar` such that the remote jdk does not need to be included in runfiles. Doing it like this prevents massive bloat when attesting. `user-java-distribution` and `user-java-version`: let the user specify the exact java they want to use to build When users run the run-script they will include an additional flag `local_javabin` which they will set to their local javabin that the run-script will utilize to run the `_deploy.jar` A combination of `bazel query` and `bazel cquery` were used to resolved edge cases with the implementation. --------- Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Noah Elzner <[email protected]> Signed-off-by: Ian Lewis <[email protected]> Signed-off-by: laurentsimon <[email protected]> Signed-off-by: laurentsimon <[email protected]> Co-authored-by: Ian Lewis <[email protected]> Co-authored-by: laurentsimon <[email protected]> Signed-off-by: Noah Elzner <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
cc: @mihaimaruseac
This will provide support for artifacts that also need runfiles. Users can use a flag,
needs-runfiles
, to also package the artifact alongside the runfiles Bazel generates if the user deems it as necessary.Also, support for Java artifacts is made available by packaging the JARs to be standalone through a format in Bazel called
_deploy.jar
. Alongside the_deploy.jar
, there will be a modifiedrun-script
that allows the users that download the artifact to run the run-script by using a flag calledlocal_javabin
, where they put the path to their own java bin such that it is utilized by the run-script. This run-script is generated by Bazel from a template and later modified in thebuild.sh
in the internal part of the builder to add this flag for the users. More information is available on the readme.Java targets will automatically be converted to their
_deploy.jar
with this. Three flags are used for users that have java targets:includes-java
: if true then adds an additional flag to build command as well as rule for local java repo in WORKSPACE in order to utilize the--singlejar
capability of run-script for_deploy.jar
such that the remote jdk does not need to be included in runfiles. Doing it like this prevents massive bloat when attesting.user-java-distribution
anduser-java-version
: let the user specify the exact java they want to use to buildWhen users run the run-script they will include an additional flag
local_javabin
which they will set to their local javabin that the run-script will utilize to run the_deploy.jar
A combination of
bazel query
andbazel cquery
were used to resolved edge cases with the implementation.