From d5ef6309a100bc7808a236dcfb723be68499d79a Mon Sep 17 00:00:00 2001 From: thienqb123456 Date: Tue, 24 Dec 2024 03:28:59 +0700 Subject: [PATCH] Thienv - --- be/be-acp/cd-acp-backend.Jenkinsfile | 2 -- fe/fe-acp/cd-acp-frontend.Jenkinsfile | 25 +++++++++++++++---------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/be/be-acp/cd-acp-backend.Jenkinsfile b/be/be-acp/cd-acp-backend.Jenkinsfile index 504091e..8f68f89 100644 --- a/be/be-acp/cd-acp-backend.Jenkinsfile +++ b/be/be-acp/cd-acp-backend.Jenkinsfile @@ -94,8 +94,6 @@ pipeline { } } } - - } //Thienvv- hàm checkout git code ansible về máy ansible diff --git a/fe/fe-acp/cd-acp-frontend.Jenkinsfile b/fe/fe-acp/cd-acp-frontend.Jenkinsfile index d16679e..06a335d 100644 --- a/fe/fe-acp/cd-acp-frontend.Jenkinsfile +++ b/fe/fe-acp/cd-acp-frontend.Jenkinsfile @@ -77,21 +77,27 @@ pipeline { post { always { - script { - def message = "Build : API - Môi trường ${params.ENV} - Dự án ${env.PROJECT_NAME}, ${currentBuild.fullDisplayName}\n${env.BUILD_URL}" - sh "curl -s -X POST https://api.telegram.org/bot${env.TELEGRAM_BOT_TOKEN}/sendMessage -d chat_id=${env.TELEGRAM_CHAT_ID} -d text=\"${message}\"" + node { + script { + def message = "Build : API - Môi trường ${params.ENV} - Dự án ${env.PROJECT_NAME}, ${currentBuild.fullDisplayName}\n${env.BUILD_URL}" + sh "curl -s -X POST https://api.telegram.org/bot${env.TELEGRAM_BOT_TOKEN}/sendMessage -d chat_id=${env.TELEGRAM_CHAT_ID} -d text=\"${message}\"" + } } } success { - script { - def message = "Build thành công : API - Môi trường ${params.ENV} - Dự án ${env.PROJECT_NAME}, ${currentBuild.fullDisplayName}\n${env.BUILD_URL}" - sh "curl -s -X POST https://api.telegram.org/bot${env.TELEGRAM_BOT_TOKEN}/sendMessage -d chat_id=${env.TELEGRAM_CHAT_ID} -d text=\"${message}\"" + node { + script { + def message = "Build thành công : API - Môi trường ${params.ENV} - Dự án ${env.PROJECT_NAME}, ${currentBuild.fullDisplayName}\n${env.BUILD_URL}" + sh "curl -s -X POST https://api.telegram.org/bot${env.TELEGRAM_BOT_TOKEN}/sendMessage -d chat_id=${env.TELEGRAM_CHAT_ID} -d text=\"${message}\"" + } } } failure { - script { - def message = "Build thất bại: API - Môi trường ${params.ENV} - Dự án ${env.PROJECT_NAME}, ${currentBuild.fullDisplayName}\n${env.BUILD_URL}" - sh "curl -s -X POST https://api.telegram.org/bot${env.TELEGRAM_BOT_TOKEN}/sendMessage -d chat_id=${env.TELEGRAM_CHAT_ID} -d text=\"${message}\"" + node { + script { + def message = "Build thất bại: API - Môi trường ${params.ENV} - Dự án ${env.PROJECT_NAME}, ${currentBuild.fullDisplayName}\n${env.BUILD_URL}" + sh "curl -s -X POST https://api.telegram.org/bot${env.TELEGRAM_BOT_TOKEN}/sendMessage -d chat_id=${env.TELEGRAM_CHAT_ID} -d text=\"${message}\"" + } } } } @@ -188,7 +194,6 @@ def retrieveArtifactMetadataFromCIJOB(String ciJobName, String ciJobBuildNumber, } } - def triggerAnsible( String sshAnsibleConnection, String ansibleansibleFolderPath,