Commit graph

29 commits

Author SHA1 Message Date
daz
f22ac61fd1 Use Gradle 8.11 as the minimum version for cache-cleanup
The cache-cleanup API has changed, so the init-script that worked with
Gradle 8.9 no longer works with 8.11.
We now provision and use Gradle 8.11 for cache cleanup.

This provides a band-aid fix for #417 but that issue will still impact
any build configured to run with Gradle > 8.11
2024-11-11 20:54:29 -07:00
daz
f31476bde2
Update test for real-world data
This test assumed that at least one 'snapshot' wrapper checksum was unique,
and not contained in the set of wrapper checksums for released distributions.
This is no longer the case, so the assumption has been modified.
2024-11-11 12:18:11 -07:00
daz
d32c4bdc08
Update wrapper to Gradle 8.10.2 2024-10-07 11:24:35 +10:00
Daz DeBoer
e5c1381176
Include cache save/restore times in Job Summary (#389)
Fixes #370
2024-09-13 10:45:46 -06:00
Alexis Tual
765a73447c Fix passing expiresInHours query parameter 2024-09-12 18:43:23 -06:00
Daz DeBoer
7e0f050645
Ensure minimum Gradle version for cache-cleanup (#364)
Instead of always installing and using the latest Gradle version for
cache cleanup, we now require at least Gradle 8.9.

This avoids downloading and installing Gradle if the version on PATH is
sufficient to perform cache cleanup.
2024-08-31 11:11:24 -06:00
daz
a8a2fd2323
Update to Gradle 8.10 2024-08-26 11:07:48 -06:00
daz
ac3aebda93
Improve error messages for min-wrapper-count
- Specific message when no wrappers are found
- Better message when wrapper count is less than configured

Fixes #284
2024-08-02 15:51:41 -06:00
daz
b6395da67c
Cache validated checksums for later executions
The most common case for validation will be that the wrapper jars are unchanged
from a previous workflow run. In this case, we cache the validated wrapper
checksums to minimise the work required on a subsequent run.

Fixes #172
2024-08-01 10:52:36 -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
54f7dc55a5
Adapt for new structure of build results 2024-07-18 22:25:58 -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
c3acd19a4a Update to Gradle 8.9
Some checks failed
CI-check-and-unit-test / check-format-and-unit-test (push) Has been cancelled
CI-codeql / Analyze (javascript-typescript) (push) Has been cancelled
CI-init-script-check / test-init-scripts (push) Has been cancelled
CI-integ-test / determine-suite (push) Has been cancelled
CI-update-dist / update-dist (push) Has been cancelled
CI-integ-test / build-distribution (push) Has been cancelled
CI-integ-test / action-inputs (push) Has been cancelled
CI-integ-test / build-scan-publish (push) Has been cancelled
CI-integ-test / cache-cleanup (push) Has been cancelled
CI-integ-test / caching-config (push) Has been cancelled
CI-integ-test / dependency-graph (push) Has been cancelled
CI-integ-test / dependency-submission (push) Has been cancelled
CI-integ-test / dependency-submission-failures (push) Has been cancelled
CI-integ-test / execution-with-caching (push) Has been cancelled
CI-integ-test / execution (push) Has been cancelled
CI-integ-test / develocity-injection (push) Has been cancelled
CI-integ-test / provision-gradle-versions (push) Has been cancelled
CI-integ-test / restore-configuration-cache (push) Has been cancelled
CI-integ-test / restore-containerized-gradle-home (push) Has been cancelled
CI-integ-test / restore-custom-gradle-home (push) Has been cancelled
CI-integ-test / restore-gradle-home (push) Has been cancelled
CI-integ-test / restore-java-toolchain (push) Has been cancelled
CI-integ-test / sample-kotlin-dsl (push) Has been cancelled
CI-integ-test / sample-gradle-plugin (push) Has been cancelled
CI-integ-test / toolchain-detection (push) Has been cancelled
CI-integ-test / wrapper-validation (push) Has been cancelled
2024-07-14 08:12:33 -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 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
daz
2db3ae936e Update to Gradle 8.8 2024-06-13 09:03:40 -06:00
Alexis Tual
500e0ee5b3
Add support for short-lived tokens (#224)
The setup-gradle action tries to get a short-lived access token given the supplied Develocity access key.
This key can be passed either with the `DEVELOCITY_ACCESS_KEY` env var or via the  `develocity-access-key` input parameter.
If a token can be retrieved, then the `DEVELOCITY_ACCESS_KEY` env var will be set to the token. 
Otherwise the `DEVELOCITY_ACCESS_KEY` will be set to a blank string, to avoid a leak.

---------

Co-authored-by: daz <daz@gradle.com>
2024-05-15 16:49:55 -06:00
Gabriel Feo
cd62d9c9ef Improve job summary readability with long tasks
Change tests for nbsp and concise badge

Make tests pass

Signed-off-by: Gabriel Feo <gabriel@gabrielfeo.com>
2024-04-25 19:40:04 +01:00
Gabriel Feo
a54fb6a5bb Add tests on current job-summary behavior
Signed-off-by: Gabriel Feo <gabriel@gabrielfeo.com>
2024-04-25 17:44:41 +01:00
daz
f1476a710d
Initial import of wrapper-validation-action 2024-04-10 21:17:49 -06:00
Philip Wedemann
0f427bc07b
Add a test for merging existing toolchains.xml (#151) 2024-04-10 17:20:36 -06:00
Daz DeBoer
e21decc9db
Create toolchains.xml dynamically based on envs (#150)
Different runners have different JDKs installed, so using a hard-coded
list for
`toolchains.xml` doesn't work. With this change, the file is generated
based on the available `JAVA_HOME_*` environment variables.

Fixes #89 

Thanks @hfhbd for the contribution!

Co-authored-by: hfhbd <22521688+hfhbd@users.noreply.github.com>
2024-04-10 12:25:22 -06:00
daz
7e9e469530
Rename 'input-params' to 'configuration' 2024-04-09 15:08:54 -06:00
daz
528fe78d31
Moved cache-related code into subpackage 2024-04-08 14:02:20 -06:00
daz
cfd20ecc0a
Replace static config methods with config types
This will allow different entry points to have different inputs.
2024-04-07 11:00:34 -06:00
daz
393df4bfa2 Bump to Gradle 8.7 2024-03-23 09:32:57 -06:00
daz
60b8089f55
Avoid dirty state after unit-test execution 2024-03-12 22:15:37 +13:00
hfhbd
f4f7af32dc
Configure --info and --stacktrace when GitHub ACTIONS_RUNNER_DEBUG is true
Fixes #6
2024-02-11 16:56:16 -07:00
daz
5e522253a6
Combine all sources into a sub-directory 2024-01-25 11:53:44 -07:00