@@ -22,6 +22,7 @@ interface Props {
2222 buildLink : string ;
2323 organizationId : string ;
2424 domains : Domain [ ] ;
25+ environmentName : string ;
2526}
2627
2728export const sendBuildSuccessNotifications = async ( {
@@ -31,6 +32,7 @@ export const sendBuildSuccessNotifications = async ({
3132 buildLink,
3233 organizationId,
3334 domains,
35+ environmentName,
3436} : Props ) => {
3537 const date = new Date ( ) ;
3638 const unixDate = ~ ~ ( Number ( date ) / 1000 ) ;
@@ -62,6 +64,7 @@ export const sendBuildSuccessNotifications = async ({
6264 applicationType,
6365 buildLink,
6466 date : date . toLocaleString ( ) ,
67+ environmentName,
6568 } ) ,
6669 ) . catch ( ) ;
6770 await sendEmailNotification ( email , "Build success for dokploy" , template ) ;
@@ -72,7 +75,7 @@ export const sendBuildSuccessNotifications = async ({
7275 `${ discord . decoration ? decoration : "" } ${ text } ` . trim ( ) ;
7376
7477 await sendDiscordNotification ( discord , {
75- title : decorate ( ">" , "`✅` Build Success " ) ,
78+ title : decorate ( ">" , "`✅` Build Successes " ) ,
7679 color : 0x57f287 ,
7780 fields : [
7881 {
@@ -85,6 +88,11 @@ export const sendBuildSuccessNotifications = async ({
8588 value : applicationName ,
8689 inline : true ,
8790 } ,
91+ {
92+ name : decorate ( "`🌍`" , "Environment" ) ,
93+ value : environmentName ,
94+ inline : true ,
95+ } ,
8896 {
8997 name : decorate ( "`❔`" , "Type" ) ,
9098 value : applicationType ,
@@ -125,6 +133,7 @@ export const sendBuildSuccessNotifications = async ({
125133 decorate ( "✅" , "Build Success" ) ,
126134 `${ decorate ( "🛠️" , `Project: ${ projectName } ` ) } ` +
127135 `${ decorate ( "⚙️" , `Application: ${ applicationName } ` ) } ` +
136+ `${ decorate ( "🌍" , `Environment: ${ environmentName } ` ) } ` +
128137 `${ decorate ( "❔" , `Type: ${ applicationType } ` ) } ` +
129138 `${ decorate ( "🕒" , `Date: ${ date . toLocaleString ( ) } ` ) } ` +
130139 `${ decorate ( "🔗" , `Build details:\n${ buildLink } ` ) } ` ,
@@ -139,6 +148,7 @@ export const sendBuildSuccessNotifications = async ({
139148 `view, Build details, ${ buildLink } , clear=true;` ,
140149 `🛠Project: ${ projectName } \n` +
141150 `⚙️Application: ${ applicationName } \n` +
151+ `🌍Environment: ${ environmentName } \n` +
142152 `❔Type: ${ applicationType } \n` +
143153 `🕒Date: ${ date . toLocaleString ( ) } ` ,
144154 ) ;
@@ -167,7 +177,7 @@ export const sendBuildSuccessNotifications = async ({
167177
168178 await sendTelegramNotification (
169179 telegram ,
170- `<b>✅ Build Success</b>\n\n<b>Project:</b> ${ projectName } \n<b>Application:</b> ${ applicationName } \n<b>Type:</b> ${ applicationType } \n<b>Date:</b> ${ format ( date , "PP" ) } \n<b>Time:</b> ${ format ( date , "pp" ) } ` ,
180+ `<b>✅ Build Success</b>\n\n<b>Project:</b> ${ projectName } \n<b>Application:</b> ${ applicationName } \n<b>Environment:</b> ${ environmentName } \n<b> Type:</b> ${ applicationType } \n<b>Date:</b> ${ format ( date , "PP" ) } \n<b>Time:</b> ${ format ( date , "pp" ) } ` ,
171181 inlineButton ,
172182 ) ;
173183 }
@@ -191,6 +201,11 @@ export const sendBuildSuccessNotifications = async ({
191201 value : applicationName ,
192202 short : true ,
193203 } ,
204+ {
205+ title : "Environment" ,
206+ value : environmentName ,
207+ short : true ,
208+ } ,
194209 {
195210 title : "Type" ,
196211 value : applicationType ,
@@ -260,6 +275,12 @@ export const sendBuildSuccessNotifications = async ({
260275 text_align : "left" ,
261276 text_size : "normal_v2" ,
262277 } ,
278+ {
279+ tag : "markdown" ,
280+ content : `**Environment:**\n${ environmentName } ` ,
281+ text_align : "left" ,
282+ text_size : "normal_v2" ,
283+ } ,
263284 {
264285 tag : "markdown" ,
265286 content : `**Type:**\n${ applicationType } ` ,
0 commit comments