NodeProperty extension behaves differently with Freestyle than Pipeline job

19 views
Skip to first unread message

Anders Hammar

unread,
Sep 7, 2021, 6:42:59 AM9/7/21
to jenkins...@googlegroups.com
Hi,

I'm trying to build an extension that would automatically remove/delete the workspace when leaving a node. It seems possible to do this through a NodeProperty extension where I create an Environment object that would handle this.

However, trying this I see different behavior in e.g. a Freestyle build than in a pipeline build. In the Freestyle build it works, but in the pipeline build the setUp() method is not called. Is this difference expected?

The extension can be found at [1].

/Anders

Björn Pedersen

unread,
Sep 7, 2021, 7:00:15 AM9/7/21
to Jenkins Users
(Note: better suited jenkinsci-dev list)

Node and workspace handling differs quite a lot between freestyle and pipeline jobs. In a single pipeline you can create many nodes (node block) and even works spaces (ws blocks).
So this is  expected...

Björn

and...@hammar.net

unread,
Sep 7, 2021, 3:30:33 PM9/7/21
to Jenkins Users
Ok, thanks for clarifying.

/Anders

Reply all
Reply to author
Forward
0 new messages