How can pipeline 'post' stages be executed in the pipeline agent environment?
In the below, the deleteDir() is executing outside the dockerfile defined container, thus not as root, and will fail to remove any files that were generated inside the container as root.
It appears by default that the post for a specific stage execute in the current agent for that stage, which might be the pipeline agent, but that by default post for the while pipeline execute in a 'none' environment. Is there a method to specify the agent for the whole pipeline post?
|Field||Original Value||New Value|
|Summary||declarative pipeline post do execute in agent||declarative pipeline post do not execute in agent|