[JIRA] [email-ext-plugin] (JENKINS-33980) Document (List) Pipeline features of email-ext-plugin
Title: Message Title David van Laatum edited a comment on JENKINS-33980 Re: Document (List) Pipeline features of email-ext-plugin The reason triggers don't really make sense in a pipeline is because a plugin runs at a particular point in the pipeline not "at the end" so the correct way to implement the triggers in a pipeline is to call the plugin at the various points where you need to do it. for example to send an email on a failed build you could:{code:java}try { // something that might fail} catch(e) { currentBuild.result = 'FAILURE' emailext body: e.toString(), subject: 'it failed :(', to: 'some...@noware.com'}{code} Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [email-ext-plugin] (JENKINS-33980) Document (List) Pipeline features of email-ext-plugin
Title: Message Title David van Laatum commented on JENKINS-33980 Re: Document (List) Pipeline features of email-ext-plugin The reason triggers don't really make sense in a pipeline is because a plugin runs at a particular point in the pipeline not "at the end" so the correct way to implement the triggers in a pipeline is to call the plugin at the various points where you need to do it. for example to send an email on a failed build you could: try { // something that might fail } catch(e) { emailext body: e.toString(), subject: 'it failed :(', to: 'some...@noware.com' } Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [email-ext-plugin] (JENKINS-33980) Document (List) Pipeline features of email-ext-plugin
Title: Message Title David van Laatum assigned an issue to David van Laatum Jenkins / JENKINS-33980 Document (List) Pipeline features of email-ext-plugin Change By: David van Laatum Assignee: Alex Earl David van Laatum Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [email-ext-plugin] (JENKINS-33980) Document (List) Pipeline features of email-ext-plugin
Title: Message Title Martin Kaiser commented on JENKINS-33980 Re: Document (List) Pipeline features of email-ext-plugin https://issues.jenkins-ci.org/browse/JENKINS-33980?focusedCommentId=255305=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-255305 Alex Earl added a comment - 2016/Apr/21 8:32 PM Yes, it's very true, much of the functionality is not available, but some of it also doesn't make sense. For instance, triggers don't make sense in pipeline, which is a large part of the normal freestylejob capability. I think the main functionality that needs attention is the token replacement. What other features from freestylejob are you missing? I found this thread searching for a way to send emails from a pipeline like they can be configured in freestyle projects (I want emails on StateChange and a list of culprits for my pipeline). I don't want do sound naive, but why don't triggers make any sense in a pipeline project? In my pipeline (FPGA Hardware-Design) referencing single freestyle projects for every build-configuration is not managable. This is why I really need a pipeline that can be managed via one script. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [email-ext-plugin] (JENKINS-33980) Document (List) Pipeline features of email-ext-plugin
Title: Message Title Alex Earl commented on JENKINS-33980 Re: Document (List) Pipeline features of email-ext-plugin You can look at the source for AbstractBuild on github and it's getCulprits method. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [email-ext-plugin] (JENKINS-33980) Document (List) Pipeline features of email-ext-plugin
Title: Message Title Leon Leon edited a comment on JENKINS-33980 Re: Document (List) Pipeline features of email-ext-plugin Hello, this works fine for committers, do you have any idea about accessing the culprits list within a pipeline ? Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [email-ext-plugin] (JENKINS-33980) Document (List) Pipeline features of email-ext-plugin
Title: Message Title Leon Leon commented on JENKINS-33980 Re: Document (List) Pipeline features of email-ext-plugin Hello, this works fine for committers, do you have any idea about accessing the culprits list ? Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [email-ext-plugin] (JENKINS-33980) Document (List) Pipeline features of email-ext-plugin
Title: Message Title Phil McArdle edited a comment on JENKINS-33980 Re: Document (List) Pipeline features of email-ext-plugin I'm fairly sure there's code for this on Stack Overflow somewhere, but, here's what I'm doing, if it'll help you. Obvious caveats for my primary use case at present is Perforce, I've cribbed this from a helper class I wrote for my own usage, and modified the opening line so you can see where I'm getting the data from. I've removed most comments - most of them say that I'm guessing the behaviour of specific classes or methods. Otherwise I just read the API docs and source code and iterate live in pipeline until I find the data I want. Edit: To caveat, I am neither an experienced Java or Groovy programmer. {code}def changeLogSets = currentBuild.rawBuild.changeSetsif (changeLogSets.size() > 0) {for (changeLogSet in changeLogSets) {// Not everyone implements ChangeLogSet the same way, so check for those we supportif (changeLogSet.class == org.jenkinsci.plugins.p4.changes.P4ChangeSet) {for (changeLog in changeLogSet) {def change = [:]// Common fieldschange.msg = changeLog.msgchange.msgAnnotated = changeLog.msgAnnotatedchange.msgEscaped = changeLog.msgEscapedchange.timestamp = changeLog.timestampchange.author = changeLog.authorchange.affectedPaths = changeLog.affectedPaths// Common fields not implemented the same by Perforcechange.affectedFiles = []for (file in changeLog.files) {// This is horrible, but Perforce returns files as FileSpec, while// Jenkins standard for affectedFiles is ChangeLogSet.AffectedFile, // and neither are compatible, so just return a fully annotated path insteadchange.affectedFiles.add("${file.toString()} ${file.getAction().toString()}")}change.commitId = changeLog.idchange.timestamp = changeLog.date// Perforce-specific fields (not a complete list)change.clientId = changeLog.clientIdm_Changes.add(change)}}}}{code} Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
[JIRA] [email-ext-plugin] (JENKINS-33980) Document (List) Pipeline features of email-ext-plugin
Title: Message Title Phil McArdle commented on JENKINS-33980 Re: Document (List) Pipeline features of email-ext-plugin I'm fairly sure there's code for this on Stack Overflow somewhere, but, here's what I'm doing, if it'll help you. Obvious caveats for my primary use case at present is Perforce, I've cribbed this from a helper class I wrote for my own usage, and modified the opening line so you can see where I'm getting the data from. I've removed most comments - most of them say that I'm guessing the behaviour of specific classes or methods. Otherwise I just read the API docs and source code and iterate live in pipeline until I find the data I want. def changeLogSets = currentBuild.rawBuild.changeSets if (changeLogSets.size() > 0) { for (changeLogSet in changeLogSets) { // Not everyone implements ChangeLogSet the same way, so check for those we support if (changeLogSet.class == org.jenkinsci.plugins.p4.changes.P4ChangeSet) { for (changeLog in changeLogSet) { def change = [:] // Common fields change.msg = changeLog.msg change.msgAnnotated = changeLog.msgAnnotated change.msgEscaped = changeLog.msgEscaped change.timestamp = changeLog.timestamp change.author = changeLog.author change.affectedPaths = changeLog.affectedPaths // Common fields not implemented the same by Perforce change.affectedFiles = [] for (file in changeLog.files) { // This is horrible, but Perforce returns files as FileSpec, while // Jenkins standard for affectedFiles is ChangeLogSet.AffectedFile, // and neither are compatible, so just return a fully annotated path instead change.affectedFiles.add("${file.toString()} ${file.getAction().toString()}") } change.commitId = changeLog.id change.timestamp = changeLog.date // Perforce-specific fields (not a complete list) change.clientId = changeLog.clientId m_Changes.add(change) } } } } Add Comment This message was sent by Atlassian JIRA
[JIRA] [email-ext-plugin] (JENKINS-33980) Document (List) Pipeline features of email-ext-plugin
Title: Message Title Alex Earl commented on JENKINS-33980 Re: Document (List) Pipeline features of email-ext-plugin You could get this without email-ext by using getChangeSets on the workflow run (not sure how you get to that part) and looping through the changesets and their entries to retrieve the committer information. Not as nice as a tidy package, but it can be done. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [email-ext-plugin] (JENKINS-33980) Document (List) Pipeline features of email-ext-plugin
Title: Message Title Pedro Algarvio commented on JENKINS-33980 Re: Document (List) Pipeline features of email-ext-plugin For now I'm only after the committer email address and I seem to be unable to get that within a workflow/pipeline job... Any examples would be great! Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [email-ext-plugin] (JENKINS-33980) Document (List) Pipeline features of email-ext-plugin
Title: Message Title Pedro Algarvio commented on JENKINS-33980 Re: Document (List) Pipeline features of email-ext-plugin I reached this issue by trying to find out about the missing templates support on a pipeline job... Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [email-ext-plugin] (JENKINS-33980) Document (List) Pipeline features of email-ext-plugin
Title: Message Title Christian Höltje commented on JENKINS-33980 Re: Document (List) Pipeline features of email-ext-plugin I'm less concerned about templates, than some of the useful email lists, like Culprits. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [email-ext-plugin] (JENKINS-33980) Document (List) Pipeline features of email-ext-plugin
Title: Message Title Tom Larrow commented on JENKINS-33980 Re: Document (List) Pipeline features of email-ext-plugin Tokens are the biggest thing, but they feed into templates. I'm trying to build an Enterprise version of Jenkins, and bringing jobs over from lots of teams had on their own Jenkins servers running under someone's desk somewhere. One of the big goals has been to use Pipeline, and build a DSL to standardize everything. Almost all of the jobs from the other teams are freestyle and most use email-ext and have built elaborate templates in the Email-ext Template plugin. There's nothing in https://jenkins.io/doc/pipeline/steps/email-ext/ which describes how to call a template. Since templates could have different messages, and many other components based on the trigger, this is what was causing me to ask how to "throw" a trigger to the Email-ext plugin in order to select a different portion of a template. Additionally, (and this may be something that is there I'm just not seeing how to do it with the documentation) how do we include the possible culprits in the emails? This is one of the best features of Email-ext, to include an ever larger and larger group of people in the notifications until the build gets fixed. I didn't know if it is something as simple as including $CULPRITS in the to field, or if there is something that needs to be in the groovy Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [email-ext-plugin] (JENKINS-33980) Document (List) Pipeline features of email-ext-plugin
Title: Message Title Alex Earl commented on JENKINS-33980 Re: Document (List) Pipeline features of email-ext-plugin Yes, it's very true, much of the functionality is not available, but some of it also doesn't make sense. For instance, triggers don't make sense in pipeline, which is a large part of the normal freestylejob capability. I think the main functionality that needs attention is the token replacement. What other features from freestylejob are you missing? Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [email-ext-plugin] (JENKINS-33980) Document (List) Pipeline features of email-ext-plugin
Title: Message Title Tom Larrow commented on JENKINS-33980 Re: Document (List) Pipeline features of email-ext-plugin Agreed, it seems like much of the email-ext functionality is not available with the pipeline. Templates, triggers, and many of the tokens seem to not work when called from a Pipeline script. Email-ext seems to have pretty good documentation overall, but none of it seems to apply to the limited subset of features available to pipeline. Better documentation and examples, and even some templates (if they are available in pipeline) would help us understand what is available, where the gaps exist in functionality available to pipeline, and let us know if there are things we can help contribute to bring the email-ext pipeline features up to the same level that freestyle projects have. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [email-ext-plugin] (JENKINS-33980) Document (List) Pipeline features of email-ext-plugin
Title: Message Title Sorin Sbarnea commented on JENKINS-33980 Re: Document (List) Pipeline features of email-ext-plugin Putting a section on the plugin wiki page would solve only half of the problem. Now the current "documentation" is far from being usable. How about including at least one real-life example in it? The current text opens more questions than it solves. How do I build the list of emails which I am supposed to put inside the "to" field? I assume that I want to include the person that triggered the build (if it has an email) and all the emails of the changeset authors. Examples are the best way to document, not function signatures. If you could provide some help around here it would be great. I am sure that once we learn how to use it we will also start to contribute back (or at least me). Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [email-ext-plugin] (JENKINS-33980) Document (List) Pipeline features of email-ext-plugin
Title: Message Title Martin d'Anjou commented on JENKINS-33980 Re: Document (List) Pipeline features of email-ext-plugin Yes, this is useful. I think a link to that page should be provided on the wiki. Perhaps the wiki can automatically link to the Pipeline step description. However, that is not much in terms of documentation. Prospective users need to know more than "function signatures". Some fields are obvious of course, but others deserve more than just a name-type entry. Perhaps the help text from the plugin could also be rendered the doc/pipeline/steps page. This way prospective users can quickly find the features offered in the Pipeline flavor of the plugin (vs. the traditional flavor). I think this is valid for all plugins, so feel free to modify this Jira and make it more general. Thank you. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [email-ext-plugin] (JENKINS-33980) Document (List) Pipeline features of email-ext-plugin
Title: Message Title Alex Earl commented on JENKINS-33980 Re: Document (List) Pipeline features of email-ext-plugin The pipeline steps are actually documented at https://jenkins.io/doc/pipeline/steps/email-ext/, does this fit the requirement of what you are looking for? Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [email-ext-plugin] (JENKINS-33980) Document (List) Pipeline features of email-ext-plugin
Title: Message Title Martin d'Anjou created an issue Jenkins / JENKINS-33980 Document (List) Pipeline features of email-ext-plugin Issue Type: Improvement Assignee: Alex Earl Components: email-ext-plugin Created: 2016/Apr/01 2:20 PM Priority: Minor Reporter: Martin d'Anjou Please briefly document (or list) the Pipeline DSL features offered by this plugin compared to the built-in mail step (or compared to the traditional form of this plugin). Thanks. Add Comment