Use an environment variable for the on-demand KPI pipeline 90/140890/2
authorhalil.cakal <halil.cakal@est.tech>
Thu, 15 May 2025 15:28:42 +0000 (16:28 +0100)
committerhalil.cakal <halil.cakal@est.tech>
Thu, 15 May 2025 16:01:09 +0000 (17:01 +0100)
- introduce an environment variable that can be set (export) from
  the onap-cps-kpi-on-demand job (jenkins)

Issue-ID: CPS-2694

Change-Id: I33a2e583e06c4b5cbafcdcf0d05e8cb89a573c8e
Signed-off-by: halil.cakal <halil.cakal@est.tech>
k6-tests/ncmp/common/utils.js

index 1934fc3..09144a7 100644 (file)
@@ -27,7 +27,7 @@ export const NCMP_BASE_URL = testConfig.hosts.ncmpBaseUrl;
 export const DMI_PLUGIN_URL = testConfig.hosts.dmiStubUrl;
 export const CONTAINER_UP_TIME_IN_SECONDS = testConfig.hosts.containerUpTimeInSeconds;
 export const LEGACY_BATCH_TOPIC_NAME = 'legacy_batch_topic';
-export const TOTAL_CM_HANDLES = 50000;
+export const TOTAL_CM_HANDLES = __ENV.TOTAL_CM_HANDLES ? parseInt(__ENV.TOTAL_CM_HANDLES) : 50000;
 export const REGISTRATION_BATCH_SIZE = 2000;
 export const READ_DATA_FOR_CM_HANDLE_DELAY_MS = 300; // must have same value as in docker-compose.yml
 export const WRITE_DATA_FOR_CM_HANDLE_DELAY_MS = 670; // must have same value as in docker-compose.yml