Skip to content

Conversation

@uriahcarpenter
Copy link
Member

This pull request introduces comprehensive improvements to the Buildkite Gradle plugin project, focusing on enhanced testing infrastructure, plugin DSL features, and documentation. The main highlights are the addition of Gradle TestKit-based testing (with Spock and JUnit 5), new utility methods for pipeline step conditionals, and expanded documentation for both users and maintainers.

Testing Infrastructure Improvements:

  • Added a full Gradle TestKit-based testing setup in buildSrc, including Spock and JUnit 5 integration, to enable both unit and functional testing of the plugin. This includes new test source files, configuration in build.gradle, and a TESTING.md guide. [1] [2] [3] [4]
  • Introduced baseline YAML output files and documentation to support regression testing of the plugin DSL output. [1] [2] [3] [4] [5] [6] [7]

Plugin DSL and Code Enhancements:

  • Added new DSL methods to BuildkitePipeline for step conditionals and dependency handling, such as onDefaultBranch(), notOnDefaultBranch(), ifCondition(String), and allowDependencyFailure().
  • Refactored task creation in BuildkitePlugin to use tasks.register (lazy task creation) instead of tasks.create, improving performance and compatibility with modern Gradle best practices. [1] [2]

Documentation Updates:

  • Added a new "Publishing" section to the main README.md describing the release process.
  • Added a plugin marker file for Gradle plugin discovery.

Testing Infrastructure

  • buildSrc/build.gradle: Added Spock, JUnit 5, and TestKit dependencies; configured test tasks for JUnit Platform; added plugin metadata generation for TestKit.
  • buildSrc/TESTING.md: Added detailed documentation on using Gradle TestKit and Spock for plugin testing.
  • buildSrc/src/test/groovy/com/widen/plugins/buildkite/BuildkitePluginFunctionalTest.groovy, BuildkitePluginTest.groovy: Added comprehensive functional and unit tests for plugin application, task creation, and extension configuration. [1] [2]
  • buildSrc/src/test/resources/expected-pipeline-output/: Added baseline YAML files and documentation for regression testing of DSL output. [1] [2] [3] [4] [5] [6] [7]

Plugin DSL and Code Enhancements

Documentation Updates

@uriahcarpenter uriahcarpenter requested review from sagebind and removed request for sagebind November 11, 2025 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants