sửa cd be-portal

This commit is contained in:
thienqb123456
2025-03-03 16:22:48 +07:00
parent 87de8b0ee2
commit b4832fdb97
+6 -2
View File
@@ -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} \\