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

Access job data (variables / shared libs) from email .template

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Minor Minor
    • email-ext-plugin
    • None

      I try to import my own shared library inside html.template file but for no success.

      During my pipeline I store test and build results inside a Singleton and then I want to format them and send them via mail (using email-ext plugin)

      My Problem is :

      I can't access variables from outside the template:
      @Library('my-lib@emails')_ => not working
      import my.lib.JobData => not working
      I need an option to access pipeline context from template groovy (${SCRIPT, template="html.template")
      in order to format that data

          [JENKINS-67547] Access job data (variables / shared libs) from email .template

          Alex Earl added a comment -

          Shared libraries are a pipeline thing, they do not apply to the context of the email templates.

          Alex Earl added a comment - Shared libraries are a pipeline thing, they do not apply to the context of the email templates.

            Unassigned Unassigned
            barel_elbaz Barel Elbaz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: