Skip to content

edgeXEmailUtil

Overview

Shared library to support the edgeXEmail function by returning relevant build information that can be used to generate an email template. Email template can be found here: https://github.com/edgexfoundry/edgex-global-pipelines/tree/main/resources/email

Function Overview

  • edgeXEmailUtil.getJobDetailsJson: Extract relevant build details including job information, author, git information, and failure log information and return map of details.
  • edgeXEmailUtil.generateEmailTemplate: Generate HTML email template from given job details usually generated by calling edgeXEmailUtil.getJobDetailsJson(). Email templates utilize mustache templates and leverage mustachejs for rendering.

Usage

def jobDetails = edgeXEmailUtil.getJobDetailsJson()
def emailHtml  = edgeXEmailUtil.generateEmailTemplate(jobDetails)

// do something with emailHtml...