I have few steps in my Jenkins pipeline that notify users, in my case using Slack integration.
is it a good practice to write the notification code inside a node
block to use a heavyweight executor or just leave it outside to make use of a flyweight executor?
According to the documentation:
Every Pipeline build itself runs on the master, using a flyweight executor — an uncounted slot that is assumed to not take any significant computational power.
This executor represents the actual Groovy script, which is almost always idle, waiting for a step to complete.
Flyweight executors are always available.
After reading this, it is still not clear to me if it is considered a good practice for notifications to use a heavyweight or flyweight executors