86 Commits

Author SHA1 Message Date
Daz DeBoer
d068148857
Choose best Gradle version to use for cache cleanup (#526)
The cache-cleanup operation works by executing Gradle on a dummy project
and a custom init-script. The init-script requires at least Gradle 8.11
to work.

Ideally, the version of Gradle used for cleanup should be no older than
the newest one that wrote entries to Gradle User Home. If an older
Gradle version is used for cache-cleanup, it will not remove entries
written specifically for newer versions.

With this change, we now attempt to ensure that cache-cleanup is run
with the best Gradle version available. We inspect the Gradle version on
PATH to see if it is new enough, otherwise we will provision a Gradle
version equal to the newest one that ran in the Job.

The logic is:
- Determine the newest version of Gradle that was executed during the
Job. This is the 'minimum version' for cache cleanup.
- Inspect the Gradle version on PATH (if any) to see if it is equal to
or newer than the 'minimum version'.
- If the version Gradle on PATH is new enough, use that version for
cache-cleanup.
- If not, attempt to provision Gradle with the 'minimum version'.

Fixes #436
2025-01-24 06:16:52 -07:00
bot-githubaction
b426ffebae Bump references to Develocity Gradle plugin from 3.19 to 3.19.1 2025-01-24 06:16:18 -07:00
daz
c6e631b4a7
Attempt to provision best gradle version for cache-cleanup 2025-01-23 17:37:15 -07:00
daz
edf9e3c8c7
Improve comparison of Gradle versions 2025-01-23 17:36:14 -07:00
daz
24aa9155d9
Fix minor typo in log message 2025-01-23 12:08:44 -07:00
Daz DeBoer
3bfa1140fc
Update to CCUDGP 2.1 (#524)
This change primarily impacts test projects and documentation. The only
material impact is that CCUD 2.1 will now be auto-applied when
publishing Build Scans automatically with `build-scan-publish: true`.
(Develocity injection does not hard-code any CCUD version)
2025-01-21 21:34:02 -07:00
daz
faf1d7ca7a
Copy the raw JDK path into toolchains.xml
Previously we were relying on Gradle to substitute JDK environment variables
in toolchains.xml. With this change, the actual path to the JDK is encoded instead.
This should avoid issues where Gradle is not able to successfully resolve the
envioronment variable.
2025-01-20 10:20:43 -07:00
Kevin Brightwell
8c3e41f260 chore: Clean-up missing imports for tests (#505)
Noticed had missing imports in tests, this adds them and orders imports consistently. Not sure why eslint missed this.
2025-01-14 14:12:34 -07:00
github-actions[bot]
04f1562da5
Bump Gradle Wrappers (#499)
# Combined PRs ➡️📦⬅️

 The following pull requests have been successfully combined on this
PR:
- Closes #498 Bump Gradle Wrapper from 8.11.1 to 8.12 in
/.github/workflow-samples/kotlin-dsl
- Closes #497 Bump Gradle Wrapper from 8.11.1 to 8.12 in
/.github/workflow-samples/java-toolchain
- Closes #496 Bump Gradle Wrapper from 8.11.1 to 8.12 in
/.github/workflow-samples/groovy-dsl
- Closes #495 Bump Gradle Wrapper from 8.11.1 to 8.12 in
/.github/workflow-samples/gradle-plugin
- Closes #494 Bump Gradle Wrapper from 8.11.1 to 8.12 in
/sources/test/init-scripts

> This PR was created by the
[`github/combine-prs`](https://github.com/github/combine-prs) action

---------

Signed-off-by: bot-githubaction <bot-githubaction@gradle.com>
Co-authored-by: bot-githubaction <bot-githubaction@gradle.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: daz <daz@gradle.com>
2024-12-20 18:23:34 -07:00
Daz DeBoer
5c7e362ae3
Remove deprecation warning from init-script (#491) 2024-12-17 17:59:42 -07:00
Daz DeBoer
59d7e81070
Attempt to limit failures in wrapper-validation tests (#490)
- Reduce requests involved in checksums.retryTest
- Reduce requests involved in validate test
- Fetch checksum values in batches
2024-12-17 17:58:41 -07:00
bot-githubaction
eda5a3331f Bump references to Develocity Gradle plugin from 3.18.2 to 3.19 2024-12-13 09:02:59 -07:00
daz
e0281833fa
Fix unit test to deal with new Gradle releases 2024-12-13 08:56:11 -07:00
bot-githubaction
ec885c4918 Bump Gradle Wrapper from 8.10.2 to 8.11.1.
Release notes of Gradle 8.11.1 can be found here:
https://docs.gradle.org/8.11.1/release-notes.html

Signed-off-by: bot-githubaction <bot-githubaction@gradle.com>
2024-12-12 09:23:31 -07:00
Daz DeBoer
df34468a37
Bump com.fasterxml.jackson.dataformat:jackson-dataformat-smile from 2.18.1 to 2.18.2 in /sources/test/init-scripts in the gradle group across 1 directory (#478)
Bumps the gradle group with 1 update in the /sources/test/init-scripts
directory:
[com.fasterxml.jackson.dataformat:jackson-dataformat-smile](https://github.com/FasterXML/jackson-dataformats-binary).

Updates `com.fasterxml.jackson.dataformat:jackson-dataformat-smile` from
2.18.1 to 2.18.2
<details>
<summary>Commits</summary>
<ul>
<li><a
href="147bc6024b"><code>147bc60</code></a>
[maven-release-plugin] prepare release
jackson-dataformats-binary-2.18.2</li>
<li><a
href="92648ab980"><code>92648ab</code></a>
Prep for 2.18.2</li>
<li><a
href="d31d695767"><code>d31d695</code></a>
Merge branch '2.17' into 2.18</li>
<li><a
href="a7232c691a"><code>a7232c6</code></a>
Back to snapshot dep</li>
<li><a
href="b362d85402"><code>b362d85</code></a>
[maven-release-plugin] prepare for next development iteration</li>
<li><a
href="d817f53ab6"><code>d817f53</code></a>
[maven-release-plugin] prepare release
jackson-dataformats-binary-2.17.3</li>
<li><a
href="d88c088671"><code>d88c088</code></a>
Prep for 2.17.3</li>
<li><a
href="fa5abd6573"><code>fa5abd6</code></a>
Back to snapshot dep</li>
<li><a
href="d048e2fd91"><code>d048e2f</code></a>
[maven-release-plugin] prepare for next development iteration</li>
<li>See full diff in <a
href="https://github.com/FasterXML/jackson-dataformats-binary/compare/jackson-dataformats-binary-2.18.1...jackson-dataformats-binary-2.18.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.fasterxml.jackson.dataformat:jackson-dataformat-smile&package-manager=gradle&previous-version=2.18.1&new-version=2.18.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>
2024-12-11 12:23:14 -07:00
dependabot[bot]
94bb6cf7ce
Bump com.fasterxml.jackson.dataformat:jackson-dataformat-smile
Bumps the gradle group with 1 update in the /sources/test/init-scripts directory: [com.fasterxml.jackson.dataformat:jackson-dataformat-smile](https://github.com/FasterXML/jackson-dataformats-binary).


Updates `com.fasterxml.jackson.dataformat:jackson-dataformat-smile` from 2.18.1 to 2.18.2
- [Commits](https://github.com/FasterXML/jackson-dataformats-binary/compare/jackson-dataformats-binary-2.18.1...jackson-dataformats-binary-2.18.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-11 17:55:02 +00:00
daz
97d952f5cd
Update tests for changed init-script logging 2024-12-11 10:49:42 -07:00
daz
51109c9e9e
Update to Gradle 8.11.1 2024-12-11 10:04:45 -07:00
daz
9ab6ee6757
Bump to version 2.0.2 of CCUDGP 2024-11-15 14:10:13 -07:00
Daz DeBoer
83709b49fe
Fix checksum test by reducing network calls (#444)
This test was originally starting with an empty set of checksums,
leading to the download of a checksum for every released and snapshot
version. This resulted in in sporadic test failures.

We now start with a known set of checksums and ensure that those that
are missing are downloaded. This involved some refactoring and
improvement in the way snapshot checksums are processed.
2024-11-14 15:44:07 -07:00
Daz DeBoer
5f21a9bb99
Bump Gradle from 8.10.2 to 8.11 (#443)
Co-authored-by: bot-githubaction <bot-githubaction@gradle.com>
2024-11-14 13:48:42 -07:00
bot-githubaction
084b95f65a Bump references to Develocity Gradle plugin from 3.18.1 to 3.18.2 2024-11-14 09:26:53 -07:00
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
dependabot[bot]
b526f6673b
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.18.0 to 2.18.1.
- [Commits](https://github.com/FasterXML/jackson-dataformats-binary/compare/jackson-dataformats-binary-2.18.0...jackson-dataformats-binary-2.18.1)

---
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-11-11 12:18:11 -07:00
dependabot[bot]
ff4a71656f
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.2 to 2.18.0.
- [Commits](https://github.com/FasterXML/jackson-dataformats-binary/compare/jackson-dataformats-binary-2.17.2...jackson-dataformats-binary-2.18.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-07 11:24:35 +10: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
bot-githubaction
5fe9264c08 Bump references to Develocity Gradle plugin from 3.18 to 3.18.1 2024-09-12 19:55:39 -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
0873530e60 Increase Gradle version coverage for init-scripts
As well as testing latest of each major version, also test early release of 6.x and 7.x
2024-08-26 13:57:09 -06:00
daz
a8a2fd2323
Update to Gradle 8.10 2024-08-26 11:07:48 -06:00
bot-githubaction
089bfb1063
Bump references to Develocity Gradle plugin from 3.17.6 to 3.18 2024-08-26 10:53:40 -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
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
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 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 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
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
b9abb7b195
Use latest dependency graph plugin (#269) 2024-06-27 19:42:01 -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
bot-githubaction
1d2ea6e5a8 Bump references to Develocity Gradle plugin from 3.17.4 to 3.17.5 2024-06-13 10:01:04 -06:00
daz
2db3ae936e Update to Gradle 8.8 2024-06-13 09:03:40 -06:00
Bot Githubaction
30610bc983
Bump references to Develocity Gradle plugin from 3.17.3 to 3.17.4 (#236)
This PR bumps references to Develocity Gradle plugin from 3.17.3 to 3.17.4.

---------

Co-authored-by: Eric Haag <ehaag@gradle.com>
2024-05-23 08:56:09 -06:00