buildpacks
buildpacks copied to clipboard
Cloud Code: Cloud Run run configuration in IntelliJ does not work on Windows due to commandline errors
Quite simply, the commandlines it is issuing appear to be linux commands rather than ones made for windows and this seems to be causing the failure. Here is the relevant part of the Cloud Run logs:
===> BUILDING
[builder] === Java - Runtime ([email protected]) ===
[builder] Using latest Java 11 runtime version. You can specify a different version with GOOGLE_RUNTIME_VERSION: https://github.com/GoogleCloudPlatform/buildpacks#configuration
[builder] 2023/02/22 01:57:41 [DEBUG] GET https://dl.google.com/runtimes/ubuntu1804/openjdk/version.json
[builder] Installing v11.0.18+10.
[builder] 2023/02/22 01:57:41 [DEBUG] GET https://dl.google.com/runtimes/ubuntu1804/openjdk/openjdk-11.0.18_10.tar.gz
[builder] Warning: BOM table is deprecated in this buildpack api version, though it remains supported for backwards compatibility. Buildpack authors should write BOM information to <layer>.sbom.<ext>, launch.sbom.<ext>, or build.sbom.<ext>.
[builder] Warning: BOM table is deprecated in this buildpack api version, though it remains supported for backwards compatibility. Buildpack authors should write BOM information to <layer>.sbom.<ext>, launch.sbom.<ext>, or build.sbom.<ext>.
[builder] Warning: BOM table is deprecated in this buildpack api version, though it remains supported for backwards compatibility. Buildpack authors should write BOM information to <layer>.sbom.<ext>, launch.sbom.<ext>, or build.sbom.<ext>.
[builder] === Java - Gradle ([email protected]) ===
[builder] --------------------------------------------------------------------------------
[builder] Running "./gradlew clean assemble -x test --build-cache --quiet"
[builder] Done "./gradlew clean assemble -x test --build-cache --quiet" (583.7µs)
[builder] Failure: (ID: 14f2a5b3) executing command "./gradlew clean assemble -x test --build-cache --quiet": fork/exec ./gradlew: no such file or directory: if "./gradlew" is a script, ensure that it has Unix-style LF line endings
[builder] --------------------------------------------------------------------------------
[builder] Sorry your project couldn't be built.
[builder] Our documentation explains ways to configure Buildpacks to better recognise your project:
[builder] -> https://cloud.google.com/docs/buildpacks/overview
[builder] If you think you've found an issue, please report it:
[builder] -> https://github.com/GoogleCloudPlatform/buildpacks/issues/new
[builder] --------------------------------------------------------------------------------
[builder] ERROR: failed to build: exit status 1
Cleaning up...
- No resources found
build [runeforge] failed: executing lifecycle. This may be the result of using an untrusted builder: failed with status code: 51
Failed to start Cloud Run dev session.
Thanks for reporting it. Please note that the build using the buildpacks are meant to run on a Linux container. Were you able to find a workaround for this problem? I wonder if the included gradlew script in your code can be fixed to work on both Windows and Linux.
I found this on StackOverflow. Please take a look and update here if it fixes your problem.
https://stackoverflow.com/a/50507954
@Emperorlou were you able to debug that problem?
No, I didn't. I just didn't bother with Cloud Run and instead I use gradle tasks for everything.
On Tue, 4 Apr 2023 at 09:24, James Ma @.***> wrote:
@Emperorlou https://github.com/Emperorlou were you able to debug that problem?
— Reply to this email directly, view it on GitHub https://github.com/GoogleCloudPlatform/buildpacks/issues/277#issuecomment-1496263842, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACM6HEFFUUWQZ33HTKGB7DW7RDKBANCNFSM6AAAAAAVD3ZW5A . You are receiving this because you were mentioned.Message ID: @.***>