-
Notifications
You must be signed in to change notification settings - Fork 138
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
Gradle builder not working (with or without wrapper) #2727
Comments
@AdamKorcz Can you take a look? |
okay, sorry I finally got a chance to look at this. In each case: (1) you need to also check in the (2) this action depends on the existence of the gradle wrapper, the runtime container does not contain gradle, so it can't run anything |
Do we need to update the documentation? |
I think (1) is a mistake by the user, I think (2) is maybe a problem with documentation. Ensure that we explicitly require gradle wrapper. |
Thanks @loosebazooka feel free to send a PR to improve documentation and tag me on it |
Fix pending in #3250, but we should find a way to test the new behavior, where the project directory is the same as the repository root. |
Can you try calling your fork from your own project? I think you'll need to update this line in your fork https://github.com/slsa-framework/slsa-github-generator/blob/main/.github/workflows/builder_maven_slsa3.yml#L84, to ensure it calls your fork instead of this repo. Let me know if this works or not. |
Fixes the Gradle builds #2727 I think the first attempt to fix (now reverted) was mostly correct, but in this PR I correct the directory comparison conditional. - #3083 - #3089 Also adds some documentation for handling multi-project builds, which seem to now be the default when initializing a new Gradle app. - https://docs.gradle.org/current/samples/sample_building_java_applications.html#review_the_project_files ## Testing Tested against my own sample project * https://github.com/ramonpetgrave64/my-example-gradle-project/pull/1/files/af3b52a88d6bf053d04f3456a8bb78f6d32c4061 * https://github.com/ramonpetgrave64/my-example-gradle-project/actions/runs/7850051301 Modified the `slsa-framwork/example-package` e2e tests against my own fork. The actual builds and provenance generation succeed, except for the verify stage, which should fail because my fork `https://github.com/ramonpetgrave64/slsa-github-generator/.github/workflows/builder_gradle_slsa3.yml@refs/heads/main` is not a "trusted builder". * ebffcc9 * main...ramonpetgrave64:slsa-github-generator:67a2f7b7efb421e55c3a787161d5968681f3db15 * https://github.com/ramonpetgrave64/example-package/actions/runs/7850413736/job/21425770965 --------- Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com> Signed-off-by: Ramon Petgrave <32398091+ramonpetgrave64@users.noreply.github.com>
Fixed by #3250 |
I attempted to run the Gradle builder as a Github Action on a sample project following the instructions, but it does not work.
I attempted using a standard wrapper:
https://github.com/bbossola/gradle-sample-project/actions/runs/6240805328/job/16941718533
And without:
https://github.com/bbossola/gradle-sample-project/actions/runs/6240908435/job/16942059861
In both situation, the project is not built and the action fails. I followed the instructions provided. Please advice.
The text was updated successfully, but these errors were encountered: