fix: update ChromeHeadless command to include --no-sandbox option

This commit is contained in:
2026-03-06 11:58:30 +05:30
parent 196ad13eea
commit ddf92e0548
Vendored
+13 -1
View File
@@ -12,6 +12,10 @@ pipeline {
stage('Build & Test') { stage('Build & Test') {
agent { label getAgentLabel() } agent { label getAgentLabel() }
environment {
CHROME_BIN = "${getChromeBin()}"
}
stages { stages {
stage('Cleanup Workspace') { stage('Cleanup Workspace') {
@@ -64,7 +68,7 @@ pipeline {
} }
} }
steps { steps {
sh 'npm run test -- --watch=false --browsers=ChromeHeadless' sh 'npm run test -- --watch=false --browsers=ChromeHeadless --no-sandbox'
} }
} }
@@ -174,3 +178,11 @@ def getHealthUrl() {
return "https://bangararaju-uat.kottedi.in/admin" return "https://bangararaju-uat.kottedi.in/admin"
} }
} }
def getChromeBin() {
if (env.BRANCH_NAME == 'prod') {
return "/snap/bin/chromium"
} else {
return "/usr/bin/chromium"
}
}