From 40c760c7cc9c1feb822f14e9908189c95641c4bb Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Sat, 17 Jan 2026 21:55:38 +0800 Subject: [PATCH] 1688 PO Automation Project --- Jenkinsfile | 27 +++++++++++++++++++++++++++ resources/assets/vue/app.js | 3 +++ 2 files changed, 30 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index e42f2841..17e280f9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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' } } diff --git a/resources/assets/vue/app.js b/resources/assets/vue/app.js index 873f034f..f6ec60e7 100644 --- a/resources/assets/vue/app.js +++ b/resources/assets/vue/app.js @@ -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',