Commit Graph
100 Commits
Author SHA1 Message Date
Daz DeBoerandGitHub dad038d88d Use Gradle 8.8 features for Gradle Home cleanup (#272)
Fixes #33
Fixes #24
Fixes #46 
Fixes #169
2024-06-28 13:46:10 -06:00
daz 621f3b3f79 Run cache-cleanup build with --info
Resolves #169
2024-06-28 13:25:56 -06:00
daz 4022faad7e Fix integ-test-cache-cleanup.yml for running on act 2024-06-28 13:21:54 -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 DeBoerandGitHub b9abb7b195 Use latest dependency graph plugin (#269) 2024-06-27 19:42:01 -06:00
Daz DeBoerandGitHub c04155e2ca Remove instructions for merging Dependabot PRs
These are no longer required, since the bot will update the `dist` directory.
2024-06-27 19:32:31 -06:00
daz 1da1cc97d5 Rename Develocity secret 2024-06-27 18:49:52 -06:00
Daz DeBoerandGitHub 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 8dbe9a3802 Update DV access key regex to be more selective
This should address the code-scanning alert
  https://github.com/gradle/actions/security/code-scanning/1
2024-06-13 13:35:19 -06:00
daz 30c82f0068 Fail on invalid boolean for Develocity inputs 2024-06-13 13:31:25 -06:00
daz e3bc05f224 Run CodeQL on PRs 2024-06-13 13:15:23 -06:00
daz 485ea107b7 Run CodeQL on dev/* branches 2024-06-13 13:01:56 -06:00
daz 2db3ae936e Update to Gradle 8.8 2024-06-13 09:03:40 -06:00
Daz DeBoerandGitHub ea14aa9caf Dependency updates (#222)
- Bump to com.gradle.develocity plugin v3.17.3
- Bump JVM dependencies in sample projects
2024-05-11 07:45:47 -06:00
daz 941b289d84 Avoid running Gradle 3.5.1 on MacOS where Java 8 is not available 2024-04-25 21:23:15 +01:00
Daz DeBoerandGitHub bce7daca54 Improve build scan badge readability with long tasks (#200)
Improve readability of build scan when requested tasks is very long, as
agreed in #175. HTML diff for each case of job summary is clearer in
cd62d9c9ef.

- Ensure a minimum size for the badge, at least the size of "Build
scan®", by preventing a line break with ` `
- Reduce the size of the badge by tweaking the inner text

Also fix a typo in the build shell script.
2024-04-25 21:22:36 +01:00
daz 11eaed9738 Avoid Java 8 since it is not available on MacOS runners 2024-04-25 20:17:16 +01:00
daz a772c14b33 Avoid updating real dependency graph in tests 2024-04-25 11:19:43 +01:00
daz 7763d71170 Set the report dir for download-and-submit
Fixes #196
2024-04-25 11:19:43 +01:00
daz d124ec149f Retain and log stacktrace for submission errors 2024-04-19 10:24:45 -06:00
Daz DeBoerandGitHub c198d84863 Support custom report dir for dependency-submission (#189)
If the `DEPENDENCY_GRAPH_REPORT_DIR` var is set, use this value when locating dependency-graph files to upload/submit.

Fixes #188
2024-04-18 13:40:41 -06:00
Daz DeBoerandGitHub d211a39090 Documentation updates (#187)
* Use consistent YAML syntax in example workflows
* Add link to plugin env vars
2024-04-18 09:39:15 -06:00
daz eef9b10930 Bump Develocity and CCUD plugin versions 2024-04-17 19:08:51 -06:00
daz 3c2d3b6f2a Include VS code workspace file
This workspace sets things up so that source code navigation works
propertly in VS code.
2024-04-12 15:39:30 -06:00
daz 0fa10b26b8 Update releasing guide 2024-04-12 14:01:48 -06:00
daz 6d55902761 Deprecate 'wrapper-validation-action'
Deprecation warning will be emitted when we:
- Change 'wrapper-validation-action' to delegate to 'actions/wrapper-validation'
- Add the 'wrapper-validation-action' id as env var before delegating
2024-04-12 10:34:50 -06:00
daz 0325d99e52 Workflow fixes
- Fix typo in 'paths-ignore'
- Add back 'buildDistribution' to demo job summary
2024-04-12 10:34:50 -06:00
daz d0f2f0387e Update build script and contribution guide 2024-04-12 09:15:19 -06:00
daz feb10e7858 Minor formatting fix 2024-04-12 00:39:23 -06:00
daz 5893d44739 Use fixed job name for cache restore 2024-04-12 00:38:28 -06:00
daz fb14e0ee5b Skip the 'download-dist' step for full integ-test
After the '[bot] update dist directory' commit, we run a full test suite.
This will now use the content from the 'dist' directory, rather than
regenerating this content in the test.
2024-04-12 00:24:44 -06:00
daz 0261d93071 Switch back to unique cache entries with full integ-test 2024-04-11 23:00:25 -06:00
daz b855ea8d07 Revert inconsequential change 2024-04-11 22:55:22 -06:00
daz 7d97cfadb0 Avoid most workflows when only 'dist' has changed 2024-04-11 22:54:09 -06:00
daz 3e6b0e422f Inconsequential change 2024-04-11 22:47:10 -06:00
daz ebf9707dff Use a bot token to generate "Update dist" commit
This will permit workflows to run when this commit is applied.

- Avoid running ci-update-dist for modifications to dist directory (no recursion)
- Run full-suite only in response to bot updates.
2024-04-11 22:44:13 -06:00
daz 0627979b9c Only allow one integ-test at a time per branch 2024-04-11 22:44:13 -06:00
daz 713dee76c6 Update extracted cache entries for Gradle 8.6+
- Extracted transform jars for newer Gradle versions 8.6+
- Extracted `groovy-dsl` which was introduced in Gradle 8.7

Fixes #45
2024-04-11 14:04:25 -06:00
Daz DeBoerandGitHub 38e549269f Allow wrapper validation via the 'setup-gradle' action (#162)
Adds a 'validate-wrappers' option to `gradle/actions/setup-gradle`,
which defaults to 'false'.
When 'true', the action will first validate all Gradle wrappers in the
repository before proceeding.

Fixes #161
2024-04-11 12:40:45 -06:00
daz e9d1819b96 Document 'validate-wrappers' input 2024-04-11 12:35:15 -06:00
daz 62557f3635 Enable wrapper validation with setup-gradle action 2024-04-11 11:56:55 -06:00
daz 33741bd2bb Make it easier to run workflows locally with 'act' 2024-04-11 11:56:01 -06:00
daz ea328a863d Update documentation link 2024-04-11 10:23:52 -06:00
daz ba79f71e36 Consolidate error processing in actions 2024-04-11 10:19:53 -06:00
Daz DeBoerandGitHub 3a234be20e Import wrapper validation into gradle/actions (#159)
Having a single repository to host all of the Gradle GitHub Actions will
provide numerous benefits:

1. Easier to stay on top of dependency updates
2. More frequent release cycle
3. Enable integration between different actions like automatic wrapper
validation with `setup-gradle`.
2024-04-11 09:49:32 -06:00
daz c1a61df4f1 Remove unused dependency 2024-04-11 09:45:42 -06:00
daz fa4107aefb Add docs for wrapper-validation action 2024-04-11 09:04:13 -06:00
daz 39cecc54d0 Add wrapper-validation workflows 2024-04-11 08:39:21 -06:00
daz f1476a710d Initial import of wrapper-validation-action 2024-04-10 21:17:49 -06:00
daz 3252e655d0 Ensure each integ-test gets a unique cache-key-prefix 2024-04-10 20:07:14 -06:00
daz be0b7f44a7 Temporarily disable cache prefixing in integ tests
This is an attempt to stabilize our CI workflows.
2024-04-10 19:49:08 -06:00
daz 30a2ee13f2 Skip certain tests when running from fork 2024-04-10 17:05:09 -06:00
daz d37a479015 Use pull_request triggers primarily for workflows
Instead of relying on push triggers in general, we now use pull_request
and reserve push triggers for main and release branches.

This makes the behaviour more consistent for users contributing from
repository forks. However, we no longer have a quick-feedback loop
for development.
2024-04-10 16:48:14 -06:00
daz 3e155e3d92 Avoid running incompatible tests on Windows 2024-04-10 13:11:19 -06:00
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 6832731061 Fix the 'build-dist' action 2024-04-10 12:16:13 -06:00
daz b2fd266e89 List changed files when failing due to dist directory change
Hopefully this will help track down spurious failures.
2024-04-10 11:36:05 -06:00
daz 0be451eca3 Simplify the workflow triggers 2024-04-10 11:09:42 -06:00
daz 7b822e51a5 Merge quick and full tests into single workflow
- Run quick suite for Dependabot
- Run quick suite in forks
- Run quick suite if no PR is associated with commit
- Otherwise run full suite
2024-04-10 09:50:15 -06:00
daz 9e47918adf Build and commit changes to 'dist' automatically
Instead of requiring that developers keep the 'dist' directory up-to-date,
this process is now automated via a workflow.
Whenever a commit is pushed to 'main' (or a 'release/**' branch), the workflow will
build the application and commit any changes to the 'dist' directory.
2024-04-10 07:33:46 -06:00
daz b64dafb1c9 Use locally built dist for demo workflows 2024-04-10 07:33:46 -06:00
Daz DeBoerandGitHub 6a8b99d4b5 Improve GHA workflows (#148)
A bunch of improvements to the GHA workflow pipeline including:
- Separate workflow for unit tests
- Always use a locally-built dist directory for integ-tests
- Only run 'quick' integ-tests for non-PR commits. Once a PR is submitted, the 'full' suite will be run on each push.
2024-04-10 07:03:41 -06:00
daz 153b1135d0 Remove old workflow 2024-04-10 06:58:06 -06:00
daz 211d342ee6 Rename workflow 2024-04-10 06:57:13 -06:00
daz 6599acbe46 Add back dependency-review.yml so we can rename it 2024-04-10 06:55:58 -06:00
daz e7c0080dc5 Remove old workflows 2024-04-10 06:52:39 -06:00
daz 0979245ebd Rename 'check' workflows to 'integ-test' 2024-04-10 06:50:04 -06:00
daz 73638aa351 Run quick-check only if commit is NOT part of a PR
Without a mechanism to check this in the workflow trigger,
we instead run the workflow but skip all jobs if the commit belongs to a PR.

This effectively means that commits-without-PR will run quick-check, and commits-with-PR
will run full-check.
2024-04-10 06:39:42 -06:00
daz d28f25d60a Cache npm 2024-04-10 06:04:32 -06:00
daz 8bac4a819c Split out check-and-unit-test into separate workflow 2024-04-10 06:01:23 -06:00
daz bd3d4b0246 Check for secrets when running tests that require them 2024-04-10 05:47:43 -06:00
daz 667e034cd9 Split out test that requires DV access key 2024-04-10 05:46:20 -06:00
daz cd54673221 Use runner-os consistently in integ-tests 2024-04-10 05:46:19 -06:00
daz 0ebfbb8f41 Always build 'dist' directory for integ-tests 2024-04-10 05:06:37 -06:00
daz 9169d36880 Consolidate 'dependency-submission' tests into integ-test workflow 2024-04-10 05:00:05 -06:00
daz 63fcfbfe27 Disable fail-fast for integ tests 2024-04-09 16:07:32 -06:00
Daz DeBoerandGitHub 47fb100300 Improve deprecation-upgrade-guide 2024-04-09 16:06:46 -06:00
Daz DeBoerandGitHub 1824c01ad8 Emit warnings when using deprecated inputs / actions (#139)
Fixes #108
2024-04-09 15:51:21 -06:00
daz dec6c472c1 Build outputs 2024-04-09 15:30:42 -06:00
daz aeb3156e6f Emit deprecation warning for 'gradle-build-action' 2024-04-09 15:30:42 -06:00
daz 7e9e469530 Rename 'input-params' to 'configuration' 2024-04-09 15:08:54 -06:00
daz 9d0de74673 Emit deprecation warnings for derecated inputs
- Adds an upgrade-guide to assist with resolving deprecations
- Emit a warning when deprecated features are used
- List all deprecated features in Job Summary and link to upgrade guide
2024-04-09 15:03:03 -06:00
Daz DeBoerandGitHub 2e02e6624e Allow a task name to be specified for dependency-submission (#135)
Fixes #125
2024-04-09 09:30:27 -06:00
daz c9822ff527 Document that config-cache cannot be restored for forked PRs 2024-04-09 09:01:32 -06:00
daz cfe478af6a Build outputs 2024-04-09 08:50:24 -06:00
daz 92975d7f32 Allow a task name to be specified for dependency-submission
Fixes: #125
2024-04-09 08:46:20 -06:00
Daz DeBoerandGitHub e235596c88 Only process build results once (#133)
On long-lived machines, it's possible that the `.build-results` directory isn't cleared between invocations. This will result in the job summary including results from previous jobs.

By marking each build-results file as 'processed' at the end of the job, we can avoid this scenario.
2024-04-08 19:44:46 -06:00
Daz DeBoerandGitHub 6232a3f503 Documentation improvements (#132)
- Add `RELEASING.md` to document the release process
- Mention the recommendation to disable local build-cache when remote
build-cache is available. Fixes #102
2024-04-08 19:19:50 -06:00
Daz DeBoerandGitHub 8ffe734df6 Make cache-keys more consistent (#131)
- All cache keys are now structured as `gradle-<cache-name>-<protocol-version>-<key>`. This ensures that extracted entries are prefixed and versioned consistently
- Avoid using custom cache-key prefix for extracted entries. This should reduce the churn in integration tests that require some level of cache isolation.

As a result of this change, cache entries written with previous versions of the action will not be used.
2024-04-08 16:56:12 -06:00
daz 59a5222069 Build outputs 2024-04-08 15:14:28 -06:00
daz 498f0e409b Update cache key names
- All cache keys are now structured as 'gradle-<cache-name>-<protocol-version>
  - This ensures that extracted entries are prefixed and versioned consistently
- Avoid using custom cache-key prefix for extracted entries. This should reduce the
  churn in integration tests that require some level of cache isolation.
2024-04-08 15:14:28 -06:00
daz 3335c16182 Move execution-related code into subpackage 2024-04-08 14:04:29 -06:00
daz 528fe78d31 Moved cache-related code into subpackage 2024-04-08 14:02:20 -06:00
daz ecf84edd45 Fix wrapper verification SHA 2024-04-08 12:51:37 -06:00
Daz DeBoerandGitHub 220951bf17 Fix develocity deprecations triggered by init-scripts (#128)
Fixes #126
2024-04-08 11:12:53 -06:00
daz c93523a078 Fix Develocity deprecation warnings triggered by init-scripts 2024-04-08 10:58:12 -06:00
daz 0ac212a9d2 Make it possible to run more init-script tests on M1 Mac
Older TestKit on M1 Mac doesn't allow env vars to be passed, so we need to use
jvmArgs instead.
2024-04-08 09:46:48 -06:00
daz 2b3c9df6d2 Bump Gradle used to run init-script tests 2024-04-07 23:40:17 -06:00
daz dd32675981 Build outputs 2024-04-07 22:43:28 -06:00