Merge branch 'dillon/122-1688-po-automation-project-pusher' into vapor/development

This commit is contained in:
Dillon Ngo
2026-01-17 21:56:08 +08:00
2 changed files with 30 additions and 0 deletions
Vendored
+27
View File
@@ -23,10 +23,30 @@ pipeline {
steps {
script{
currentBuild.description = 'Step 1 of 6 Completed'
def pusherKeyCredId
def pusherCluster
switch(GIT_BRANCH) {
case "vapor/production":
pusherKeyCredId = 'pusher-prod-key'
pusherCluster = 'ap1'
git(
url: 'https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git',
credentialsId: 'gitlab-jenkins-localhost',
branch: GIT_BRANCH
)
break
case "vapor/staging":
pusherKeyCredId = 'pusher-staging-key'
pusherCluster = 'ap2'
git(
url: 'https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git',
credentialsId: 'gitlab-jenkins-localhost',
branch: GIT_BRANCH
)
break
case "vapor/development":
pusherKeyCredId = 'pusher-dev-key'
pusherCluster = 'mt1'
git(
url: 'https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git',
credentialsId: 'gitlab-jenkins-localhost',
@@ -41,6 +61,13 @@ pipeline {
)
break
}
withCredentials([string(credentialsId: pusherKeyCredId, variable: 'PUSHER_KEY')]) {
env.MIX_PUSHER_APP_KEY = PUSHER_KEY
env.MIX_PUSHER_APP_CLUSTER = pusherCluster
println "Pusher cluster : ${env.MIX_PUSHER_APP_CLUSTER}"
println "Pusher key set : ${env.MIX_PUSHER_APP_KEY}"
}
currentBuild.description = 'Step 2 of 6 Completed'
}
}
+3
View File
@@ -37,6 +37,9 @@ import Pusher from 'pusher-js';
window.Pusher = Pusher;
console.log("PUSHER KEY:", process.env.MIX_PUSHER_APP_KEY);
console.log("PUSHER CLUSTER:", process.env.MIX_PUSHER_APP_CLUSTER);
window.Echo = new Echo({
broadcaster: 'pusher',
key: '967971084bece7f43e1a',