Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 1014 Bytes

README.md

File metadata and controls

39 lines (26 loc) · 1014 Bytes

Jenkins pipeline test harness

How to test pipeline vars and flows POC.

Adding tests

  • subclass from UserFlowTest
    • implement String defineFlow() - put your Jenkinsfile content here. This should be limited to the scope of the test of course e.g.
  public String defineFlow() {
    return "node { \n" +
      "def text = 'Hello ${name}" +
      "def binding = [name: 'kitty']\n" +
      "echo interpolate(text, binding)\n"+
      "}"
  }

Tests for core classes and everything which cannot / should not be tested in a flow can go to test/groovy/ or test/java/

Test

Run: mvn clean test

It would've helped if workflow-cps-global-lib-plugin expected a standard Maven project structure