Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
buildSrc, including Spock and JUnit 5 integration, to enable both unit and functional testing of the plugin. This includes new test source files, configuration inbuild.gradle, and aTESTING.mdguide. [1] [2] [3] [4]Plugin DSL and Code Enhancements:
BuildkitePipelinefor step conditionals and dependency handling, such asonDefaultBranch(),notOnDefaultBranch(),ifCondition(String), andallowDependencyFailure().BuildkitePluginto usetasks.register(lazy task creation) instead oftasks.create, improving performance and compatibility with modern Gradle best practices. [1] [2]Documentation Updates:
README.mddescribing the release process.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
buildSrc/src/main/groovy/com/widen/plugins/buildkite/BuildkitePipeline.groovy: Added step conditional methods and dependency failure handling to the DSL.buildSrc/src/main/groovy/com/widen/plugins/buildkite/BuildkitePlugin.groovy: Refactored to use lazy task registration. [1] [2]Documentation Updates
README.md: Added publishing instructions for new releases.buildSrc/src/main/resources/META-INF/gradle-plugins/com.widen.buildkite.properties: Added plugin marker file for Gradle plugin portal compatibility.