From b4832fdb972664e2a0a977850bd6075c4364fdbf Mon Sep 17 00:00:00 2001 From: thienqb123456 Date: Mon, 3 Mar 2025 16:22:48 +0700 Subject: [PATCH] =?UTF-8?q?s=E1=BB=ADa=20cd=20be-portal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- be/be-portal/cd-portal-backend.Jenkinsfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/be/be-portal/cd-portal-backend.Jenkinsfile b/be/be-portal/cd-portal-backend.Jenkinsfile index a78aa39..a0cd92f 100644 --- a/be/be-portal/cd-portal-backend.Jenkinsfile +++ b/be/be-portal/cd-portal-backend.Jenkinsfile @@ -1,7 +1,8 @@ pipeline { agent any parameters { - choice(name: 'ENV', choices: ['prod', 'uat', 'beta'], description: 'Choose Environment') + choice(name: 'ENV', choices: ['uat', 'beta'], description: 'Choose Environment') + choice(name: 'PORTAL_NAME', choices: ['ktdt', 'hnt'], description: 'Choose Portal') string(name: 'CI_JOB_BUILD_NUMBER', defaultValue: '', description: 'Build number of CI Job') } environment { @@ -20,7 +21,7 @@ pipeline { ANSIBLE_FOLDER_PATH = '/srv/ansible_v2' ANSIBLE_INVENTORY_PATH = "inventory/${params.ENV}.ini" - ANSIBLE_PLAYBOOK_PATH = 'playbooks/deploy_be.yml' + ANSIBLE_PLAYBOOK_PATH = 'playbooks/deploy_be_portal.yml' TELEGRAM_CHAT_ID = -4678013464 TELEGRAM_BOT_TOKEN = credentials('TELEGRAM_BOT_TOKEN') @@ -67,6 +68,7 @@ pipeline { env.ANSIBLE_PLAYBOOK_PATH, params.ENV, env.PROJECT_NAME, + params.PORTAL_NAME, env.NEXUS_URL, env.NEXUS_ARTIFACT_NAME, env.NEXUS_CREDENTIALS_USR, @@ -191,6 +193,7 @@ def triggerAnsible( String playbookPath, String deployENV, String projectName, + String portalName, String nexusUrl, String nexusArtifactName, String nexusUsername, @@ -204,6 +207,7 @@ def triggerAnsible( ansible-playbook -i ${inventoryPath} ${playbookPath} \\ -e 'deploy_env=${deployENV} \\ project_name=${projectName} \\ + portal_name=${portalName} \\ nexus_url=${nexusUrl} \\ artifact_name=${nexusArtifactName} \\ nexus_username=${nexusUsername} \\