How can I test my plugin in pipeline?

34 views
Skip to first unread message

tzach solomon

unread,
Nov 16, 2023, 9:58:09 AM11/16/23
to jenkin...@googlegroups.com
Hi,

I'm following the tutorial of creating a new plugin and I want to test it in pipeline but beforehand I just wanted to check that pipeline job is working OK, so I've created a new pipeline using the Hello World template of pipeline script but it does not work OK.
What I'm seeing is this:

Started by user unknown or anonymous
[Pipeline] Start of Pipeline
[Pipeline] End of Pipeline
Finished: SUCCESS

What am I missing?

Thanks,
Tzach

Mark Waite

unread,
Nov 16, 2023, 10:07:36 AM11/16/23
to Jenkins Developers
The Hello World example assumes that the declarative Pipeline is installed.  If it is not installed, then you'll need to install it.

tzach solomon

unread,
Nov 16, 2023, 10:16:20 AM11/16/23
to jenkin...@googlegroups.com
Thank you Mark! :) 

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/36d5e6e9-ede4-490f-9500-15da22e2f472n%40googlegroups.com.

Jesse Glick

unread,
Nov 16, 2023, 11:51:43 AM11/16/23
to jenkin...@googlegroups.com

Jesse Glick

unread,
Nov 16, 2023, 11:53:28 AM11/16/23
to jenkin...@googlegroups.com
In other words, write some basic tests using JenkinsRule first. If you then want to test interactively to check UI and so on, use

mvn hpi:run

Since the relevant Pipeline plugins (minimally `workflow-job` + `workflow-cps`, usually also `workflow-basic-steps` + `workflow-durable-task-step`, occasionally others) will already be present as `test`-scoped dependencies, appropriate compatible versions of these will already be loaded in the local test server.
Reply all
Reply to author
Forward
0 new messages