Email-Ext and Pipeline Model Definition - How to send email notifications Culprits and Developers as recipients?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Email-Ext and Pipeline Model Definition - How to send email notifications Culprits and Developers as recipients?

Omeka
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: 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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b80ffb06-c458-4aad-957a-3e8e720492d0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Email-Ext and Pipeline Model Definition - How to send email notifications Culprits and Developers as recipients?

slide

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 <[hidden email]> 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: 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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b80ffb06-c458-4aad-957a-3e8e720492d0%40googlegroups.com.
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVe8VkWSGNEeTfY48CRr%3DJiwiwjoNVTubLwWZ3P_5kqcsQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Email-Ext and Pipeline Model Definition - How to send email notifications Culprits and Developers as recipients?

Michael Neale-2
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 <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="sUrjJ7IgAgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">exup...@...> 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.
<a href="http://stacktrace.jenkins-ci.org/search?query=Finished" style="color:inherit;word-wrap:break-word;background-image:initial;background-position:initial;background-repeat:initial" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fstacktrace.jenkins-ci.org%2Fsearch%3Fquery%3DFinished\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHssCpxo_9SBDo1QnB2Ildtqrjfaw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fstacktrace.jenkins-ci.org%2Fsearch%3Fquery%3DFinished\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHssCpxo_9SBDo1QnB2Ildtqrjfaw&#39;;return true;">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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="sUrjJ7IgAgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/b80ffb06-c458-4aad-957a-3e8e720492d0%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/b80ffb06-c458-4aad-957a-3e8e720492d0%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/b80ffb06-c458-4aad-957a-3e8e720492d0%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/b80ffb06-c458-4aad-957a-3e8e720492d0%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">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 [hidden email].
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 | Threaded
Open this post in threaded view
|

Re: Email-Ext and Pipeline Model Definition - How to send email notifications Culprits and Developers as recipients?

Daniel Beck

> On 31.10.2016, at 00:31, Michael Neale <[hidden email]> wrote:
>
> It is most unfortunate that emailext requires the workspace.

How else are you going to attach files?

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/D05A3E70-DEA2-4549-9E42-1D25F3BB7E16%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.