Skip to content
Svyatoslav Reyentenko edited this page Aug 2, 2012 · 8 revisions

Step 'notify'

Send email notification

centos.jpg

Plugin configuration

Name Type Example
genesis.plugin.notification.sender.name String Ivan Ivanov
genesis.plugin.notification.sender.email String [email protected]
genesis.plugin.notification.smtp.host String smtp.example.com
genesis.plugin.notification.smtp.port String 567
genesis.plugin.notification.smtp.username String [email protected]
genesis.plugin.notification.smtp.password String 123456
genesis.plugin.notification.smtp.useTls Boolean true
genesis.plugin.notification.template.folder String /home/iivanov/templates

Step parameters

Name Type Mandatory Description
emails List<String> Y Specify list of the recipients.
subject String N E-mail's subject.
templateName String Y Name of e-mail's template. Additional information about the templates can be found in the documentation for StringTemplate library.
templateParams Map<String, String> N Parameters passed to the template.

Example

variables {
   variable("globalMessage").as(String).optional(defaultValue = "Global message")
}
workflow("create"){
  steps {
    notify {
      phase = "E-mail sending"
      emails = ["[email protected]"]
      subject = "test create"
      templateName = "create_notification"
      templateParams = ["message": "Environment created"]
   }
 }
}

"create_notification" template in file "create_notification.st":

create_notification(globalMessage, message) ::= "Parampampam <globalMessage>: <message>"
Clone this wiki locally