I am using Jenkins with the email extension plugin and declarative pipelines. In https://jenkinsserver/configure i configured the "Default Subject" and "Default Content" which i want to use in a pipeline script. When i add the following code to a pipeline script, everything works perfectly fine.
post {
always {
emailext (
to: 'my@my.dom',
replyTo: 'my@my.dom',
subject: "foo",
body: "bar",
mimeType: 'text/html'
);
}
}
But i don't want to specify something in the pipeline script, everything should be done whith the data specified in the global configuration. When i remove everything and just call emailext ();
it failes with the comment that subject is missing. What can i do to work with default values specified globally?