Skip to content

Releases: jenkinsci/JenkinsPipelineUnit

1.20

06 May 18:23
Compare
Choose a tag to compare

⚠️ Breaking changes

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

📦 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

31 Jul 08:52
Compare
Choose a tag to compare

(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

✍ Other changes

📦 Dependency updates

16 changes

1.17

16 Jan 09:58
f565913
Compare
Choose a tag to compare

🚀 New features and improvements

✍ Other changes

📦 Dependency updates

1.16

18 Jul 15:20
2bbd00b
Compare
Choose a tag to compare

🐛 Bug fixes

1.15

15 Jul 09:11
Compare
Choose a tag to compare

⚠️ 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 the params map, you must use addParams.
  • mockShOutputs has been renamed to mockShHandlers (see below, #498).

🚀 New features and improvements

  • script handlers using patterns (#498) @UlrichEckhardt. Previously, helper.addShMock took a String as the first argument for an exact command to match. This method now can take a Pattern to match a regular expression, a String 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)
}

🐛 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

📦 Dependency updates

1.14

21 Feb 16:20
21e1113
Compare
Choose a tag to compare

⚠️ Breaking API changes

  • Fix sh default output (#483) @UlrichEckhardt. Specifically, the default output of the sh mock was removed. Formerly, the sh mock would return either abcd123\n for git rev-parse HEAD or \nbbb\nccc\n in all other cases (and a similar output for bat). If your tests relied on this behavior, you must now register proper output for sh 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 to PipelineTestHelper.mockShOutputs, in order to accommodate the new PipelineTestHelper.mockBatOutputs field. If your tests called helper.mockScriptOutputs, you can simply rename these usages to helper.mockShOutputs.

🐛 Bug fixes

🚀 New features and improvements

📦 Dependency updates

1.13

10 Dec 09:33
20b793b
Compare
Choose a tag to compare

🐛 Bug fixes

  • Fix: executing on agent message logs a binding value. (#444) @dblock

🚀 New features and improvements

📦 Dependency updates

1.12

18 Nov 15:58
Compare
Choose a tag to compare

🚀 New features and improvements

🐛 Bug fixes

Full Changelog: v1.10...v1.12

(Sorry for the confusion with the versioning; something went wrong with v1.11 and although the tag was published, it seems the binaries were not. Hence, v1.11 has been skipped and those changes are included in v1.12).

1.10

06 Sep 08:54
af366a3
Compare
Choose a tag to compare

🚀 New features and improvements

🐛 Bug fixes

1.9

09 Mar 17:20
Compare
Choose a tag to compare
1.9

🚀 New features and improvements

🐛 Bug fixes