@@ -174,6 +174,10 @@ export const deployApplication = async ({
174174} ) => {
175175 const application = await findApplicationById ( applicationId ) ;
176176 const serverId = application . buildServerId || application . serverId ;
177+ const applicationEntity = {
178+ ...application ,
179+ serverId : serverId ,
180+ } ;
177181
178182 const buildLink = `${ await getDokployUrl ( ) } /dashboard/project/${ application . environment . projectId } /environment/${ application . environmentId } /services/application/${ application . applicationId } ?tab=deployments` ;
179183 const deployment = await createDeployment ( {
@@ -185,15 +189,15 @@ export const deployApplication = async ({
185189 try {
186190 let command = "set -e;" ;
187191 if ( application . sourceType === "github" ) {
188- command += await cloneGithubRepository ( application ) ;
192+ command += await cloneGithubRepository ( applicationEntity ) ;
189193 } else if ( application . sourceType === "gitlab" ) {
190- command += await cloneGitlabRepository ( application ) ;
194+ command += await cloneGitlabRepository ( applicationEntity ) ;
191195 } else if ( application . sourceType === "gitea" ) {
192- command += await cloneGiteaRepository ( application ) ;
196+ command += await cloneGiteaRepository ( applicationEntity ) ;
193197 } else if ( application . sourceType === "bitbucket" ) {
194- command += await cloneBitbucketRepository ( application ) ;
198+ command += await cloneBitbucketRepository ( applicationEntity ) ;
195199 } else if ( application . sourceType === "git" ) {
196- command += await cloneGitRepository ( application ) ;
200+ command += await cloneGitRepository ( applicationEntity ) ;
197201 } else if ( application . sourceType === "docker" ) {
198202 command += await buildRemoteDocker ( application ) ;
199203 }
@@ -258,7 +262,6 @@ export const deployApplication = async ({
258262 type : "application" ,
259263 serverId : serverId ,
260264 } ) ;
261-
262265 if ( commitInfo ) {
263266 await updateDeployment ( deployment . deploymentId , {
264267 title : commitInfo . message ,
0 commit comments