If you put it in postBuild section (similar to notifications) it should 
work fine. 

It is most unfortunate that emailext requires the workspace. 

On Saturday, October 29, 2016 at 1:43:28 AM UTC+11, slide wrote:
>
> Email-ext needs access to the workspace, so if you don't use it inside a 
> node, it won't work.
>
> On Fri, Oct 28, 2016, 07:11 Eddard <[email protected] <javascript:>> 
> wrote:
>
>> Hello i am trying to send email notification to relevant developers in 
>> pipeline using model definition 
>> with this:
>>
>> notifications {
>>         always {
>>           emailext(body: 'Check console output at ${env.BUILD_URL} to 
>> view the results.', recipientProviders: [[$class: 
>> 'DevelopersRecipientProvider'], [$class: 'CulpritsRecipientProvider']], 
>> subject: '${env.JOB_NAME} ${env.BRANCH_NAME} - Build #${env.BUILD_NUMBER} - 
>> FAILED!')
>>         }
>>     }
>>
>> it fails with the following errors:
>>
>> ERROR: Attempted to execute a notification step that requires a node 
>> context. Notifications do not run inside a 'node { ... }' block.Finished 
>> <http://stacktrace.jenkins-ci.org/search?query=Finished>: FAILURE
>>
>>
>> Trying to understand the error message and the fix it if i can?
>>
>> Regards
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/b80ffb06-c458-4aad-957a-3e8e720492d0%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-users/b80ffb06-c458-4aad-957a-3e8e720492d0%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/2c3304dd-0126-4415-9e6f-377086457c20%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to