Releases: jenkinsci/JenkinsPipelineUnit
Releases · jenkinsci/JenkinsPipelineUnit
v1.24
(This is an empty release, as artifacts for v1.23 were mistakenly published with the v1.24 version)
1.23
✍ Other changes
- Added support for beforeAgent property in when statements (#680) @MKITConsulting
- feat: add support for the
encoding
parameter of thelibraryResource
step (#670) @axieum - fix: do not execute
parallel
during skipped declarative stage (#672) @axieum
📦 Dependency updates
- build(deps): bump commons-io:commons-io from 2.16.1 to 2.17.0 (#681) @dependabot
- build(deps): bump org.apache.commons:commons-lang3 from 3.16.0 to 3.17.0 (#678) @dependabot
- build(deps): bump com.cloudbees:groovy-cps from 3946.v7935cb_edb_f82 to 3953.v19f11da_8d2fa_ (#677) @dependabot
- build(deps): bump com.cloudbees:groovy-cps from 3894.3896.vca_2c931e7935 to 3946.v7935cb_edb_f82 (#676) @dependabot
- build(deps): bump com.jfrog.artifactory from 5.2.4 to 5.2.5 (#675) @dependabot
- build(deps): bump com.jfrog.artifactory from 5.2.3 to 5.2.4 (#674) @dependabot
- build(deps): bump org.apache.commons:commons-lang3 from 3.15.0 to 3.16.0 (#673) @dependabot
1.22
✍ Other changes
- fix(PipelineBaseTest): callstackdump should be updated if callstack is changed (#665) @stchar
- docs(README): add environment variable example (#662) @axieum
📦 Dependency updates
- Bump org.apache.commons:commons-lang3 from 3.14.0 to 3.15.0 (#668) @dependabot
- Bump com.jfrog.artifactory from 5.2.2 to 5.2.3 (#667) @dependabot
- Bump org.assertj:assertj-core from 3.26.0 to 3.26.3 (#666) @dependabot
- Bump com.jfrog.artifactory from 5.2.1 to 5.2.2 (#661) @dependabot
- Bump com.jfrog.artifactory from 5.2.0 to 5.2.1 (#660) @dependabot
- Bump org.assertj:assertj-core from 3.25.3 to 3.26.0 (#659) @dependabot
1.20
⚠️ Breaking changes
- Add match-all addShMock invocation (#657) @rmartine-ias
This change removes the null
argument to addShMock
/addBatMock
for registering a default matcher. The new API takes only a Closure
, meaning that you can simply remove the null
argument. Adapting your code should look something like this:
-helper.addShMock(null) { println(“No call matched”) }
+helper.addShMock { println(“No call matched”) }
✍ Other changes
- Add calls to super.setUp() in README examples (#646) @nre-ableton
- Update README.md to discuss setUp (#620) @ryeleo
- Update release documentation (#614) @nre-ableton
📦 Dependency updates
31 changes
- Bump com.cloudbees:groovy-cps from 3867.v535458ce43fd to 3894.3896.vca_2c931e7935 (#658) @dependabot
- Bump commons-io:commons-io from 2.16.0 to 2.16.1 (#656) @dependabot
- Bump commons-io:commons-io from 2.15.1 to 2.16.0 (#655) @dependabot
- Bump com.cloudbees:groovy-cps from 3832.vc43e04d6d68c to 3867.v535458ce43fd (#654) @dependabot
- Bump com.jfrog.artifactory from 5.1.14 to 5.2.0 (#652) @dependabot
- Bump org.assertj:assertj-core from 3.25.2 to 3.25.3 (#651) @dependabot
- Bump org.assertj:assertj-core from 3.25.1 to 3.25.2 (#650) @dependabot
- Bump io.jenkins.plugins:pipeline-groovy-lib from 687.v62591d623759 to 700.v0e341fa_57d53 (#649) @dependabot
- Bump com.jfrog.artifactory from 5.1.13 to 5.1.14 (#648) @dependabot
- Bump com.cloudbees:groovy-cps from 3773.v505e0052522c to 3832.vc43e04d6d68c (#645) @dependabot
- Bump org.assertj:assertj-core from 3.25.0 to 3.25.1 (#644) @dependabot
- Bump com.jfrog.artifactory from 5.1.11 to 5.1.13 (#642) @dependabot
- Bump org.assertj:assertj-core from 3.24.2 to 3.25.0 (#643) @dependabot
- Bump commons-io:commons-io from 2.15.0 to 2.15.1 (#639) @dependabot
- Bump org.apache.commons:commons-lang3 from 3.13.0 to 3.14.0 (#638) @dependabot
- Bump com.jfrog.artifactory from 5.1.10 to 5.1.11 (#637) @dependabot
- Bump commons-io:commons-io from 2.14.0 to 2.15.0 (#636) @dependabot
- Bump com.jfrog.artifactory from 5.1.9 to 5.1.10 (#635) @dependabot
- Bump commons-io:commons-io from 2.13.0 to 2.14.0 (#634) @dependabot
- Bump com.jfrog.artifactory from 5.1.6 to 5.1.9 (#633) @dependabot
- Bump io.jenkins.plugins:pipeline-groovy-lib from 685.v8ee9ed91d574 to 687.v62591d623759 (#632) @dependabot
- Bump com.jfrog.artifactory from 5.1.5 to 5.1.6 (#631) @dependabot
- Bump com.jfrog.artifactory from 5.1.4 to 5.1.5 (#630) @dependabot
- Bump io.jenkins.plugins:pipeline-groovy-lib from 673.vb_c5d5948283c to 685.v8ee9ed91d574 (#629) @dependabot
- Bump io.jenkins.plugins:pipeline-groovy-lib from 671.v07c339c842e8 to 673.vb_c5d5948283c (#628) @dependabot
- Bump org.apache.ivy:ivy from 2.5.1 to 2.5.2 (#622) @dependabot
- Bump com.cloudbees:groovy-cps from 3728.vd5c88eef9154 to 3773.v505e0052522c (#626) @dependabot
- Bump com.jfrog.artifactory from 5.1.0 to 5.1.4 (#627) @dependabot
- Bump com.jfrog.artifactory from 5.0.3 to 5.1.0 (#619) @dependabot
- Bump io.jenkins.plugins:pipeline-groovy-lib from 656.va_a_ceeb_6ffb_f7 to 671.v07c339c842e8 (#618) @dependabot
- Bump com.cloudbees:groovy-cps from 3726.v83f8cff396c9 to 3728.vd5c88eef9154 (#615) @dependabot
1.19
(Note: version v1.18 will be skipped due to some problems I had with the Gradle release plugin, since we've already published the tag and artifacts for v1.19. 😅)
👷 Changes for plugin developers
- Update groovy-cps from 1.31 to 3722.v85ce2a_c6240b_ (#611) @NotMyFault
✍ Other changes
- Gradle version updated to 8.0 (#597) @atai
- Support dockerfile agent declaration with filename (#598) @zgyorffi
- Add documentation about
addParam
(#594) @nre-ableton
📦 Dependency updates
16 changes
- Bump com.cloudbees:groovy-cps from 3722.v85ce2a_c6240b_ to 3726.v83f8cff396c9 (#613) @dependabot
- Bump org.apache.commons:commons-lang3 from 3.12.0 to 3.13.0 (#610) @dependabot
- Bump com.jfrog.artifactory from 4.33.1 to 5.0.3 (#609) @dependabot
- Bump com.jfrog.artifactory from 4.32.0 to 4.33.1 (#604) @dependabot
- Bump commons-io:commons-io from 2.12.0 to 2.13.0 (#603) @dependabot
- Bump com.jfrog.artifactory from 4.31.9 to 4.32.0 (#601) @dependabot
- Bump commons-io:commons-io from 2.11.0 to 2.12.0 (#600) @dependabot
- Bump com.jfrog.artifactory from 4.31.8 to 4.31.9 (#596) @dependabot
- Bump com.jfrog.artifactory from 4.31.7 to 4.31.8 (#593) @dependabot
- Bump com.jfrog.artifactory from 4.31.6 to 4.31.7 (#592) @dependabot
- Bump com.jfrog.artifactory from 4.31.5 to 4.31.6 (#591) @dependabot
- Bump com.jfrog.artifactory from 4.31.4 to 4.31.5 (#590) @dependabot
- Bump com.jfrog.artifactory from 4.31.3 to 4.31.4 (#587) @dependabot
- Bump com.jfrog.artifactory from 4.31.1 to 4.31.3 (#586) @dependabot
- Bump com.jfrog.artifactory from 4.31.0 to 4.31.1 (#584) @dependabot
- Bump assertj-core from 3.24.1 to 3.24.2 (#583) @dependabot
1.17
🚀 New features and improvements
- Allow declaration of kubernetes agent with no config (#568) @keegangroth
- Add Map parameter to catchError mock (#571) @Bilgetz
✍ Other changes
- Require Java 11 for Gradle build, remove Spring framework (#576) @nre-ableton
- Add note about Groovy 4 compatibility in README (#575) @nre-ableton
- Improvements to README (#552) @nre-ableton
📦 Dependency updates
- Bump groovy-all to 2.4.21 (#582) @nre-ableton
- Bump assertj-core from 3.24.0 to 3.24.1 (#580) @dependabot
- Bump assertj-core from 3.23.1 to 3.24.0 (#579) @dependabot
- Bump com.jfrog.artifactory from 4.30.1 to 4.31.0 (#577) @dependabot
- Bump com.jfrog.artifactory from 4.30.0 to 4.30.1 (#573) @dependabot
- Bump com.jfrog.artifactory from 4.29.4 to 4.30.0 (#572) @dependabot
- Bump com.jfrog.artifactory from 4.29.3 to 4.29.4 (#569) @dependabot
- Bump com.jfrog.artifactory from 4.29.2 to 4.29.3 (#563) @dependabot
- Bump ivy from 2.5.0 to 2.5.1 (#562) @dependabot
- Bump com.jfrog.artifactory from 4.29.1 to 4.29.2 (#558) @dependabot
- Bump com.jfrog.artifactory from 4.29.0 to 4.29.1 (#557) @dependabot
- Bump spring-core from 5.3.22 to 5.3.23 (#556) @dependabot
- Bump net.researchgate.release from 3.0.1 to 3.0.2 (#555) @dependabot
- Bump net.researchgate.release from 3.0.0 to 3.0.1 (#553) @dependabot
- Bump com.jfrog.artifactory from 4.28.4 to 4.29.0 (#548) @dependabot
1.16
🐛 Bug fixes
- Hotfix Make params immutable for declarative piplines (#546) @nre-ableton
1.15
⚠️ Breaking API changes
- Make params map immutable (#542) @nre-ableton. If your code was (incorrectly) modifying values in
params
, you'll now get an exception when trying to do this. This won't work on a real Jenkins server, and now it won't work in this framework either. To modify theparams
map, you must useaddParams
. mockShOutputs
has been renamed tomockShHandlers
(see below, #498).
🚀 New features and improvements
- script handlers using patterns (#498) @UlrichEckhardt. Previously,
helper.addShMock
took aString
as the first argument for an exact command to match. This method now can take aPattern
to match a regular expression, aString
for an exact match (the same behavior as before), or no argument to match anything.
Some examples:
@Test
void testWhatever() {
helper.addShMock(~/echo\s(.*)/, 'mock-output', 0)
helper.addShMock('echo "hello, world"', 'mock-output', 0)
helper.addShMock('default-mock-output', 0)
}
- feat(DockerMock): calls should show up in the call stack (#535) @stanovchar
- Generate a default closure in InterceptingGCL (#510) @nestoracunablanco
- Set currentBuild.currentResult in updateBuildStatus (#517) @nre-ableton
- Make bindings accessible in SharedLibrary classes. (#519) @nestoracunablanco
- Add mocks for all basic pipeline steps (#518) @nre-ableton
- Support "parameters" in scripted pipeline job (#495) @reinholdfuereder
🐛 Bug fixes
- Fix for shared lib and params variables being null in environment section (#529) @tomek-d
- bugfix(declarative): Stage with any 2 of parallel, steps, matrix, stages should throw error (#506) @stchar
✍ Other changes
- Don't use a single type in
MockScriptHandler
constructor (#541) @nre-ableton. This is related to #498 and would be a breaking API change, but #498 had not been part of a release yet. - Remove TestNotSerrialzibleCPS and related files (#543) @nre-ableton
- Add docs for library organization best practices (#513) @nre-ableton
- misc refactoring (#500) @UlrichEckhardt
📦 Dependency updates
- Move away from deprecated Release Drafter App (#497) @NotMyFault
- feat(gradle): bump version 7.4 (#491) @stchar
- Bump spring-core from 5.3.21 to 5.3.22 (#544) @dependabot
- Bump com.jfrog.artifactory from 4.28.3 to 4.28.4 (#539) @dependabot
- Bump net.researchgate.release from 2.8.1 to 3.0.0 (#538) @dependabot
- Bump spring-core from 5.3.20 to 5.3.21 (#537) @dependabot
- Bump assertj-core from 3.23.0 to 3.23.1 (#531) @dependabot
- Bump assertj-core from 3.22.0 to 3.23.0 (#530) @dependabot
- Bump com.jfrog.artifactory from 4.28.2 to 4.28.3 (#525) @dependabot
- Bump spring-core from 5.3.19 to 5.3.20 (#524) @dependabot
- Bump com.jfrog.artifactory from 4.28.1 to 4.28.2 (#520) @dependabot
- Bump spring-core from 5.3.18 to 5.3.19 (#514) @dependabot
- Bump spring-core from 5.3.17 to 5.3.18 (#511) @dependabot
- Bump com.jfrog.artifactory from 4.28.0 to 4.28.1 (#508) @dependabot
- Bump com.jfrog.artifactory from 4.27.1 to 4.28.0 (#502) @dependabot
- Bump spring-core from 5.3.16 to 5.3.17 (#501) @dependabot
1.14
⚠️ Breaking API changes
- Fix sh default output (#483) @UlrichEckhardt. Specifically, the default output of the
sh
mock was removed. Formerly, thesh
mock would return eitherabcd123\n
forgit rev-parse HEAD
or\nbbb\nccc\n
in all other cases (and a similar output forbat
). If your tests relied on this behavior, you must now register proper output forsh
commands like so:
@Test
void testGit() {
helper.addShMock("git rev-parse HEAD", "\nbbb\nccc\n", 0)
def result = script.sh(script: "git rev-parse HEAD", returnStdout: true)
assertEquals("\nbbb\nccc\n", result)
}
Please see the documentation for mocking sh
for more information.
- The
PipelineTestHelper.mockScriptOutputs
field was renamed toPipelineTestHelper.mockShOutputs
, in order to accommodate the newPipelineTestHelper.mockBatOutputs
field. If your tests calledhelper.mockScriptOutputs
, you can simply rename these usages tohelper.mockShOutputs
.
🐛 Bug fixes
- Split withEnv only on first
=
character (#468) @Brenne - Bugfix: mock existing local function. (#465) @nestoracunablanco
- Align sh mock exception message to AbortException (#471) @nre-ableton
- Use the same stringInterceptor in declarative and scripted pipelines (#460) @sams-gleb
🚀 New features and improvements
- Adds verify method in BasePipelineTest. (#463) @nestoracunablanco
- Fully implement mocking the
bat()
function (#484) @UlrichEckhardt - Register fileExists mock with mapped arguments (#477) @nre-ableton
- Replace AppVeyor/Travis with Jenkins (for Windows/Linux builds)/GitHub Actions (for Mac builds) @nre-ableton, @UlrichEckhardt, @dblock
- Add support for branch/tag comparators in when block (#453) @Alex-Weatherhead
📦 Dependency updates
- Bump spring-core from 5.3.15 to 5.3.16 (#492) @dependabot
- Bump com.jfrog.artifactory from 4.27.0 to 4.27.1 (#490) @dependabot
- Bump com.jfrog.artifactory from 4.26.3 to 4.27.0 (#480) @dependabot
- Bump com.jfrog.artifactory from 4.26.2 to 4.26.3 (#475) @dependabot
- Bump com.jfrog.artifactory from 4.26.1 to 4.26.2 (#474) @dependabot
- Bump spring-core from 5.3.14 to 5.3.15 (#473) @dependabot
- Bump com.jfrog.artifactory from 4.26.0 to 4.26.1 (#470) @dependabot
- Bump com.jfrog.artifactory from 4.25.5 to 4.26.0 (#469) @dependabot
- Bump com.jfrog.artifactory from 4.25.4 to 4.25.5 (#467) @dependabot
- Bump assertj-core from 3.21.0 to 3.22.0 (#466) @dependabot
- Bump com.jfrog.artifactory from 4.25.3 to 4.25.4 (#464) @dependabot
- Bump com.jfrog.artifactory from 4.25.2 to 4.25.3 (#459) @dependabot
- Bump spring-core from 5.3.13 to 5.3.14 (#458) @dependabot
- Bump com.jfrog.artifactory from 4.25.1 to 4.25.2 (#457) @dependabot
1.13
🐛 Bug fixes
🚀 New features and improvements
- Add support for alwaysPull in docker agent (#437) @nre-ableton
- Add dependabot to repository (#438) @nre-ableton
📦 Dependency updates
- Bump com.jfrog.artifactory from 4.25.0 to 4.25.1 (#456) @dependabot
- Bump com.jfrog.artifactory from 4.24.23 to 4.25.0 (#454) @dependabot
- Bump commons-io from 2.5 to 2.11.0 (#449) @dependabot
- Bump commons-math3 from 3.4.1 to 3.6.1 (#442) @dependabot
- Bump commons-lang3 from 3.5 to 3.12.0 (#445) @dependabot
- Bump ivy from 2.4.0 to 2.5.0 (#446) @dependabot
- Bump assertj-core from 3.4.1 to 3.21.0 (#447) @dependabot
- Bump junit from 4.11 to 4.13.2 (#440) @dependabot
- Bump com.jfrog.artifactory from 4.11.0 to 4.24.23 (#443) @dependabot
- Bump spring-core from 5.2.9.RELEASE to 5.3.13 (#439) @dependabot
- Bump groovy-cps from 1.12 to 1.31 (#441) @dependabot