diff --git a/x-pack/plugins/security_solution/scripts/run_cypress/project_handler/cloud_project_handler.ts b/x-pack/plugins/security_solution/scripts/run_cypress/project_handler/cloud_project_handler.ts index 5ae476c17580e..00880c054d956 100644 --- a/x-pack/plugins/security_solution/scripts/run_cypress/project_handler/cloud_project_handler.ts +++ b/x-pack/plugins/security_solution/scripts/run_cypress/project_handler/cloud_project_handler.ts @@ -44,7 +44,7 @@ export class CloudHandler extends ProjectHandler { // no kibana image override. The tests will be executed against the commit which is already promoted to QA. const qualityGate = process.env.KIBANA_MKI_QUALITY_GATE && process.env.KIBANA_MKI_QUALITY_GATE === '1'; - const override = commit ?? process.env.KIBANA_MKI_IMAGE_COMMIT; + const override = commit && commit !== '' ? commit : process.env.KIBANA_MKI_IMAGE_COMMIT; if (override && !qualityGate) { const kibanaOverrideImage = `${override?.substring(0, 12)}`; this.log.info(`Kibana Image Commit under test: ${process.env.KIBANA_MKI_IMAGE_COMMIT}!`); diff --git a/x-pack/plugins/security_solution/scripts/run_cypress/project_handler/proxy_project_handler.ts b/x-pack/plugins/security_solution/scripts/run_cypress/project_handler/proxy_project_handler.ts index dfc97e9a422d8..8cc27919377e7 100644 --- a/x-pack/plugins/security_solution/scripts/run_cypress/project_handler/proxy_project_handler.ts +++ b/x-pack/plugins/security_solution/scripts/run_cypress/project_handler/proxy_project_handler.ts @@ -44,7 +44,7 @@ export class ProxyHandler extends ProjectHandler { // no kibana image override. The tests will be executed against the commit which is already promoted to QA. const qualityGate = process.env.KIBANA_MKI_QUALITY_GATE && process.env.KIBANA_MKI_QUALITY_GATE === '1'; - const override = commit ?? process.env.KIBANA_MKI_IMAGE_COMMIT; + const override = commit && commit !== '' ? commit : process.env.KIBANA_MKI_IMAGE_COMMIT; if (override && !qualityGate) { const kibanaOverrideImage = `${override?.substring(0, 12)}`; this.log.info(`Kibana Image Commit under test: ${process.env.KIBANA_MKI_IMAGE_COMMIT}!`);