Skip to content

zhelyan/jenkins-pipeline-test-harness

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published