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