Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-33980

Document (List) Pipeline features of email-ext-plugin

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • email-ext-plugin
    • None

      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.

          [JENKINS-33980] Document (List) Pipeline features of email-ext-plugin

          Martin d'Anjou created issue -

          Alex Earl added a comment -

          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?

          Alex Earl added a comment - 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?

          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.

          Martin d'Anjou added a comment - 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.

          Sorin Sbarnea added a comment -

          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).

          Sorin Sbarnea added a comment - 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).

          Tom Larrow added a comment -

          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.

          Tom Larrow added a comment - 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.

          Alex Earl added a comment -

          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?

          Alex Earl added a comment - 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?

          Tom Larrow added a comment -

          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

          Tom Larrow added a comment - 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

          I'm less concerned about templates, than some of the useful email lists, like Culprits.

          Christian Höltje added a comment - I'm less concerned about templates, than some of the useful email lists, like Culprits.

          I reached this issue by trying to find out about the missing templates support on a pipeline job...

          Pedro Algarvio added a comment - I reached this issue by trying to find out about the missing templates support on a pipeline job...

          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!

          Pedro Algarvio added a comment - 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!

            davidvanlaatum David van Laatum
            deepchip Martin d'Anjou
            Votes:
            7 Vote for this issue
            Watchers:
            17 Start watching this issue

              Created:
              Updated:
              Resolved: