Commit Graph

402 Commits

Author SHA1 Message Date
daz b644be617f Enable wrapper validation by default
- Add 'allow-snapshot-wrappers' input parameter
- Default 'validate-wrappers' to 'true'

Fixes #12
2024-08-01 10:51:02 -06:00
daz 7179909719 Verify wrappers for distribution-snapshots
By slurping the checksum URLs from https://services.gradle.org/distributions-snapshots/
we can include these unpublished wrapper checksums in validation.

Fixes #281
2024-07-31 21:26:55 -06:00
daz c01aea0cb4 Introduce cheerio for fast HTML querying 2024-07-31 21:26:55 -06:00
daz fe594a580d Group cache-cleanup log messages for clarity 2024-07-31 21:25:22 -06:00
daz 53f2a5657b Add newline to args message 2024-07-31 13:22:03 -06:00
bot-githubaction c3f989640d Bump references to Develocity Gradle plugin from 3.17.5 to 3.17.6 2024-07-22 20:56:04 -06:00
daz 1a11891cfe Add error to job summary 2024-07-22 09:30:39 -06:00
daz fae6382622 Fail the build when arguments parameter is used 2024-07-22 09:30:39 -06:00
daz 7bb45b1dbd Finish enabling cache-cleanup by default
- Add deprecation warning for `gradle-home-cache-cleanup`
- Change default for `dependency-submission` to `cache-cleanup: on-success`
- Update documentation for changed default
2024-07-21 14:19:54 -06:00
Daz DeBoer 2289da045c Introduce dependency graph params (#304)
Fixes #193
2024-07-19 19:40:42 -06:00
daz e6688f31b8 Include RUNNER_ARCH in cache key
Previously, including RUNNER_OS was enough to prevent leaking incompatible
content between Gradle User Homes. With the introduction of macos-14,
we now need to differentiate between different runner architectures as well.

Fixes #138
2024-07-19 19:24:50 -06:00
daz 7387edbbb3 Add more input parameters for dependency-graph generation
- dependency-graph-include-projects
- dependency-graph-exclude-projects
- dependency-graph include-configurations
- dependency-graph-exclude-configurations
2024-07-19 17:22:07 -06:00
daz 9e459adb11 Add 'dependency-graph-report-dir' input parameter 2024-07-19 17:21:10 -06:00
daz 5acdee61f0 Make cache-cleanup compatible with cache-write-only 2024-07-19 16:16:59 -06:00
daz 32f9239e2c Remove the undocumented 'dependency-graph: clear' option 2024-07-19 16:16:13 -06:00
daz 12cb23c359 Enable cache-cleanup 'on-success' by default
Fixes #26
2024-07-19 15:28:39 -06:00
daz 2041ce6ab1 Fail on delegation from legacy actions 2024-07-19 15:12:40 -06:00
daz ded8009fcf Remove deprecated input parameters 2024-07-19 15:12:40 -06:00
daz 5d7c18409c Use pre-installed Gradle when version matches
By executing Gradle on the PATH, we can avoid downloading and installing
a Gradle version that is already available on the runner.

Fixes #270
2024-07-19 13:46:56 -06:00
daz 7da993afd5 Add 'which' NPM library 2024-07-19 13:46:55 -06:00
daz 917439d87d Always set the GRADLE_USER_HOME env var 2024-07-19 11:55:34 -06:00
Daz DeBoer 514ac344fc Use faster D: drive on windows for Gradle User Home and Gradle downloads (#299)
Fixes #290
2024-07-19 11:07:34 -06:00
daz f8aa3ed8b4 Use faster D: drive for Gradle User Home on Windows 2024-07-19 10:04:41 -06:00
daz b175189376 Download and install Gradle distributions into tmpdir 2024-07-19 09:14:37 -06:00
daz e7f9f25d86 Delete excluded paths on restore Gradle Home
Fixes #296
2024-07-19 09:05:31 -06:00
daz a77cb2b0f8 Add test for no cache-cleanup with config-cache hit 2024-07-18 22:25:59 -06:00
daz 54f7dc55a5 Adapt for new structure of build results 2024-07-18 22:25:58 -06:00
daz 579a013225 Capture config-cache hit in build results 2024-07-18 22:25:58 -06:00
daz 94355bbb2f Split build-results and build-scan capture into separate files 2024-07-18 22:25:58 -06:00
daz 6d20c16462 Use settingsEvaluated in preference to projectsEvaluated in init-script 2024-07-18 22:25:53 -06:00
daz 72dde7ef1e Move action entry-point sources 2024-07-18 11:09:54 -06:00
daz 27dea2df09 Allow better control over cache-cleanup
Adds new 'cache-cleanup' parameter with 3 settings: 'never', 'on-success' and 'always'.
This gives users more control over whether cache cleanup should occur.

Fixes #71
2024-07-17 20:36:33 -06:00
daz 91a526b647 Refactor BuildResults 2024-07-17 20:35:14 -06:00
daz d92de28b80 Improve cache reporting
- More succinct messages for cache-read-only and cache-disabled
- Report on cache-cleanup enabled/disabled status
2024-07-17 20:29:57 -06:00
daz 8d318190ad Add better explanation for cache status
- Clarify default settings for cache-read-only
- Explain why cache was disabled or read-only
- Provide links to documentation in Job Summary

Fixes #255
2024-07-17 15:17:09 -06:00
daz bb7a843511 Reset dependency-graph after submission
Fixes #204
2024-07-16 21:15:51 -06:00
daz 22818445b3 Restrict download-and-submit to selected file 2024-07-16 21:15:29 -06:00
Daz DeBoer dff3ef9b8d Only fetch checksums for unknown wrapper versions (#292)
The checksum values for most wrapper versions are hard-coded into the
action. These known checksum values are first used for validation: only
if none of the known values work do we download checksums.

Previously, we blindly downloaded all of the checksum values in this
case: we now only download the checksums for versions that are not in
our "known" set.

Fixes #171
2024-07-16 13:04:57 -06:00
Daz DeBoer ff865cb801 Upload dependency graph on submission failure (#291) 2024-07-15 12:47:06 -06:00
daz c3acd19a4a Update to Gradle 8.9 2024-07-14 08:12:33 -06:00
dependabot[bot] d7cd9fc65c Bump com.fasterxml.jackson.dataformat:jackson-dataformat-smile
Bumps [com.fasterxml.jackson.dataformat:jackson-dataformat-smile](https://github.com/FasterXML/jackson-dataformats-binary) from 2.17.1 to 2.17.2.
- [Commits](https://github.com/FasterXML/jackson-dataformats-binary/compare/jackson-dataformats-binary-2.17.1...jackson-dataformats-binary-2.17.2)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.dataformat:jackson-dataformat-smile
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-12 11:30:33 -06:00
github-actions[bot] 6407986e96 Update known wrapper checksums (#278)
Automatically generated pull request to update the known wrapper
checksums.

Co-authored-by: bigdaz <179734+bigdaz@users.noreply.github.com>
2024-07-12 11:29:43 -06:00
daz 621f3b3f79 Run cache-cleanup build with --info
Resolves #169
2024-06-28 13:25:56 -06:00
daz 95ef72241e Use Gradle 8.8 features for cleanup
Gradle 8.8 introduces new features that allow us to avoid using
timestamp manipulation to force the cleanup of the Gradle User Home directory.

This solution is simpler and more robust, but relies on Gradle 8.8+ always being
used for the cache cleanup operation.

Fixes #24
2024-06-28 13:06:23 -06:00
daz 169bec5d8b Provision latest Gradle for cache-cleanup
To cleanup Gradle User Home, a Gradle build must be executed.
Newer Gradle versions are able to cleanup the home directories of older versions,
but not vice-versa.

With this change, the latest version of Gradle is automatically provisioned
in order to run Gradle User Home cleanup. This ensures a consistent version of
Gradle is used for cleanup, and fixes #33 where Gradle is not pre-installed on
a custom runner.
2024-06-28 12:39:09 -06:00
Daz DeBoer b9abb7b195 Use latest dependency graph plugin (#269) 2024-06-27 19:42:01 -06:00
bigdaz 3f3913eed0 Update known wrapper checksums 2024-06-27 14:11:23 -06:00
Alexis Tual bdc7162ff9 Forward the setup short-lived token Promise
This caused a race condition not allowing the short-lived token to be returned in time before the setup finished.
2024-06-17 19:03:10 +02:00
Daz DeBoer 719985db3d Simplify requesting short-lived Develocity access tokens (#259)
- Always fetch a token for every hostname in the access key
- Use any tokens that are successfully fetched
- Retain access key if no tokens can be fetched
2024-06-14 21:18:08 -06:00
Inaki Villar 5f1c5827bf handle missing access token 2024-06-14 16:44:06 -06:00