Way to have launcher.getChannel().call() use an idle executor?

32 views
Skip to first unread message

Michael Carter

unread,
May 7, 2024, 1:47:41 PM5/7/24
to Jenkins Developers
To put simply I'm creating a security scan into my plugin that I want to run independent of jobs but run on the nodes.

I want to have it show up on screen it's running on the node for a few reasons.  Is there any examples of a background job (AsyncAperiodicWork) using an executor out there?

Jesse Glick

unread,
May 8, 2024, 1:18:36 PM5/8/24
to jenkin...@googlegroups.com
On Tue, May 7, 2024 at 1:47 PM Michael Carter <mikeyca...@gmail.com> wrote:
To put simply I'm creating a security scan into my plugin that I want to run independent of jobs but run on the nodes.

I want to have it show up on screen it's running on the node

I suppose it should be possible. You would need to implement `Queue.Task` / `.Executable`. There is quite a bit of boilerplate unfortunately, and it is not so easy to discover which Jelly facets you must implement and how (JENKINS-31203). The `workflow-durable-task-step` plugin would be a good starting point to explore.

Winter, Markus

unread,
May 8, 2024, 3:44:58 PM5/8/24
to jenkin...@googlegroups.com

One thing to consider is that when you use a normal task then it will wait in the queue when there is no free executor.

Maybe you want the task to always run even when the machine is busy, then you could implement it as FlyWeightTask. This can be made as running hidden or show as using an executor but one without a number in front of it (like you can see it when the a git checkout is running inside a pipeline step)

--
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/CANfRfr0NyKdMmsQXLpDFou4iS8MAa%3DR3_7tveXdVQfVAbMzviQ%40mail.gmail.com.

Reply all
Reply to author
Forward
0 new messages