Skip to content

if the agent has 9.0.0 installed and the workflow is configured to run with Java < 17 then cache cleanup will fail #717

@zoladkow

Description

@zoladkow

cache-cleanup step fails in case the action finds and tries to use a more recent instance of Gradle (9.0.0) while the current JDK (11) does not meet the minimal requirements (17 in case of Gradle 9.x)

Post job cleanup.
In post-action step
Stopping Gradle daemons
  Stopping Gradle daemons for /home/runner/.gradle/wrapper/dists/gradle-7.2-bin/2dnblmf4td7x66yl1d74lt32g/gradle-7.2
  /home/runner/.gradle/wrapper/dists/gradle-7.2-bin/2dnblmf4td7x66yl1d74lt32g/gradle-7.2/bin/gradle --stop
  Stopping Daemon(s)
  1 Daemon stopped
Provision Gradle >= 8.11
  Gradle version 9.0.0 is available at /usr/bin/gradle and >= 8.11. Not installing.
Executing Gradle to clean up caches
  Cleaning up caches last used before 1756218269860
  /usr/bin/gradle -g /home/runner/.gradle -I init.gradle --info --no-daemon --no-scan --build-cache -DGITHUB_DEPENDENCY_GRAPH_ENABLED=false -DGRADLE_ACTIONS_SKIP_BUILD_RESULT_CAPTURE=true noop
  Initialized native services in: /home/runner/.gradle/native
  Initialized jansi services in: /home/runner/.gradle/native
  To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/9.0.0/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.
  
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  Gradle requires JVM 17 or later to run. Your build is currently configured to use JVM 11.
  
  * Try:
  > Run with --stacktrace option to get the stack trace.
  > Run with --debug option to get more log output.
  > Run with --scan to generate a Build Scan (Powered by Develocity).
  > Get more help at https://help.gradle.org.
Warning: Cache cleanup failed. Will continue. Error: The process '/usr/bin/gradle' failed with exit code 1
Caching Gradle state
Generating Job Summary
Completed post-action step

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions