From ee0ebb62996152ef4af821f7f7c341c174e5763b Mon Sep 17 00:00:00 2001 From: shivani170 Date: Thu, 7 Nov 2024 08:25:04 +0530 Subject: [PATCH] chore: updated email templates subject --- ...poval_email_template_subject_update.up.sql | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 scripts/sql/29902200_appoval_email_template_subject_update.up.sql diff --git a/scripts/sql/29902200_appoval_email_template_subject_update.up.sql b/scripts/sql/29902200_appoval_email_template_subject_update.up.sql new file mode 100644 index 00000000000..bfb86c330d7 --- /dev/null +++ b/scripts/sql/29902200_appoval_email_template_subject_update.up.sql @@ -0,0 +1,48 @@ + +---- update notification template for CD approval smtp +UPDATE notification_templates +set template_payload = '{{"from": "{{fromEmail}}", "to": "{{toEmail}}","subject": "🛎️ Image approval requested | Application > {{appName}} | Environment > {{envName}} at {{eventTime}}","html": "
\"ci-triggered\"
Image approval request
{{eventTime}}
by{{triggeredBy}}
{{#imageApprovalLink}}View request{{/imageApprovalLink}}

Application
Environment
{{appName}}
{{envName}}
Image Details
Image tag
{{imageTag}}

Comment
{{comment}}

Tags
{{tags}}
BlogWebsite
© Devtron Labs 2024
"}' +where channel_type = 'smtp' +and node_type = 'CD' +and event_type_id = 4; + + + +---- update notification template for CD approval ses +UPDATE notification_templates +set template_payload = '{"from": "{{fromEmail}}", "to": "{{toEmail}}","subject": "🛎️ Image approval requested | Application > {{appName}} | Environment > {{envName}} at {{eventTime}}","html": "
\"ci-triggered\"
Image approval request
{{eventTime}}
by{{triggeredBy}}
{{#imageApprovalLink}}View request{{/imageApprovalLink}}

Application
Environment
{{appName}}
{{envName}}
Image Details
Image tag
{{imageTag}}

Comment
{{comment}}

Tags
{{tags}}
BlogWebsite
© Devtron Labs 2024
"}' +where channel_type = 'ses' +and node_type = 'CD' +and event_type_id = 4; + + +---- update notification template for Config approval smtp +UPDATE notification_templates +set template_payload = '{{"from": "{{fromEmail}}", "to": "{{toEmail}}","subject": "🛎️ Config Change approval requested | Application > {{appName} | Change Impacts > {{envName}} at {{eventTime}}","html": "
\"ci-triggered\"
Config Change approval request
{{eventTime}}
by{{triggeredBy}}
{{#approvalLink}}Approve{{/approvalLink}}
{{#protectConfigLink}}View request{{/protectConfigLink}}

Application
Change Impacts
{{appName}}
{{envName}}
File Details
File Type
File Name
{{protectConfigFileType}}
{{protectConfigFileName}}

Comment
{{protectConfigComment}}
BlogWebsite
© Devtron Labs 2024
"}' +where channel_type = 'smtp' +and node_type = 'CD' +and event_type_id = 5; + +---- update notification template for Config approval ses +UPDATE notification_templates +set template_payload = '{{"from": "{{fromEmail}}", "to": "{{toEmail}}","subject": "🛎️ Config Change approval requested | Application > {{appName} | Change Impacts > {{envName}} at {{eventTime}}","html": "
\"ci-triggered\"
Config Change approval request
{{eventTime}}
by{{triggeredBy}}
{{#approvalLink}}Approve{{/approvalLink}}
{{#protectConfigLink}}View request{{/protectConfigLink}}

Application
Change Impacts
{{appName}}
{{envName}}
File Details
File Type
File Name
{{protectConfigFileType}}
{{protectConfigFileName}}

Comment
{{protectConfigComment}}
BlogWebsite
© Devtron Labs 2024
"}' +where channel_type = 'ses' +and node_type = 'CD' +and event_type_id = 5; + + +---- update notification template for Config approval smtp auto +UPDATE notification_templates +set template_payload = '{ +{"from": "{{fromEmail}}", "to": "{{toEmail}}","subject": "🚫 Auto-deployment blocked:| Application: {{appName}} | Environment: {{envName}} at {{eventTime}}","html":"{{#ciMaterials}} {{^webhookType}}{{/webhookType}} {{/ciMaterials}}
ci-triggered
🚫 Auto-deployment blocked
{{eventTime}}
by{{triggeredBy}}
{{#deploymentHistoryLink}}View Pipeline{{/deploymentHistoryLink}}
{{#appDetailsLink}}App Details{{/appDetailsLink}}

{{deploymentWindowComment}}
Application
Environment
{{appName}}
{{envName}}
Stage
{{stage}}
Source Code
Branch
Commit
{{appName}}/{{branch}}
{{commit}}
Image Details
Image tag
{{dockerImg}}

BlogWebsite
© Devtron Labs 2024
"}' +where channel_type = 'smtp' +and node_type = 'CD' +and event_type_id = 6; + +---- update notification template for Config approval ses auto +UPDATE notification_templates +set template_payload = '{ +{"from": "{{fromEmail}}", "to": "{{toEmail}}","subject": "🚫 Auto-deployment blocked:| Application: {{appName}} | Environment: {{envName}} at {{eventTime}}","html":"{{#ciMaterials}} {{^webhookType}}{{/webhookType}} {{/ciMaterials}}
ci-triggered
🚫 Auto-deployment blocked
{{eventTime}}
by{{triggeredBy}}
{{#deploymentHistoryLink}}View Pipeline{{/deploymentHistoryLink}}
{{#appDetailsLink}}App Details{{/appDetailsLink}}

{{deploymentWindowComment}}
Application
Environment
{{appName}}
{{envName}}
Stage
{{stage}}
Source Code
Branch
Commit
{{appName}}/{{branch}}
{{commit}}
Image Details
Image tag
{{dockerImg}}

BlogWebsite
© Devtron Labs 2024
"}' +where channel_type = 'ses' +and node_type = 'CD' +and event_type_id = 6; \ No newline at end of file