Custom notification

Spinnaker doesn't support email id in the input field as a SpEL(Spring Expression Language) expression and parameters. Using this Custom notification-OpsMx custom stage, we can pass SpEL expression as well as parameters for all inputs like email, CC address, subject, and body message.

Prerequisites:

  • To configure and use Custom notification-OpsMx custom Stage, you should have prior knowledge of spinnaker and spinnaker custom stage job.

  • You must have a running spinnaker with a Kubernetes cluster account configured in it. For more information on spinnaker custom job, refer here.

Configure Spinnaker with Custom notification-OpsMx:

Execute the below steps to configure Spinnaker with "Custom notification-OpsMx" custom stage.

  1. Make sure Custom notification-OpsMx configuration is stored in the orca-local.yml file in the path /home/spinnaker/.hal/default/profiles which is in Halyard pod and a dependent configmap with the name email-config is already configured with ISD.

  2. Update the secrets as follows:

    • ssmtp-secrets: It contains the SMTP server email address and password. Edit the secret and provide your details in base64 encoded format.

    • Sample Data:

      • Emailpassword: cGFzc293cmRtYWls

      • ssmtpemail: b3BzbXh1c2VyQG9wc214Lmlv

Note: SMTP (Simple Mail Transfer Protocol) email configuration is required for the email notification.

To add “Custom notification-OpsMx” stage to your pipeline follow the steps below:

  1. Go to your application and click “Pipeline builder” and click “Add Stage” and then select “Custom notification-OpsMx” stage from the drop-down menu as shown below.

2. Now the configuration screen appears to provide the required parameters.

Enter the following parameters on the above configuration screen:

  • Email: Provide email id as SpEL expression or parameters. Example: ${#stage('build')['outputs']['spinnaker_property_email']} ${paramters.email} ${ccmailids}

  • CC Address: CC the other email address.

  • Subject: Headline of the mail.

  • Body Message: Please enter the content of the email body that is to be texted.

Last updated