From d794c7e9f36f45c96f6b643f63e276fb686d8305 Mon Sep 17 00:00:00 2001 From: arko0220 Date: Fri, 8 May 2026 17:49:18 +0500 Subject: [PATCH] feat: add extra_vars --- README.md | 51 ++++++++++--------- .../atp3-python-runner/templates/job.yaml | 2 + .../charts/atp3-python-runner/values.yaml | 1 + entrypoint.sh | 3 ++ scripts | 2 +- 5 files changed, 33 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 370531c..f4c37e6 100644 --- a/README.md +++ b/README.md @@ -85,31 +85,32 @@ flowchart TD ### Deploy parameters -| Parameter | Type | Mandatory | Default value | Description | -|-------------------------------------|---------|-----------|-------------------------------------------|------------------------------------------------------------------------------------------------------------------------| -| ENVIRONMENT_NAME | string | **yes** | `"default"` | Environment name (e.g., dev, test, prod). | -| ENV_CONFIGURATION_TEMPLATE_FILENAME | string | no | `environment-configuration-template.json` | Environment configuration template filename used during runtime configuration rendering. | -| ATP_TESTS_GIT_REPO_URL | string | **yes** | `""` | Git repository URL for cloning test sources. Git-URL-to-project-tests.git | -| ATP_TESTS_GIT_REPO_BRANCH | string | no | `main` | Git branch to checkout. | -| TEST_PARAMS | JSON | **yes** | `{}` | Specify what test or scope should be run, for example: `'{"execution_list":[{"type": "scope","name": "regression"}]}'` | -| ATP_ENVGENE_CONFIGURATION | JSON | no | `{}` | Additional test parameters (Systems) to pass to test runner from EnvGene. | -| ATP_TESTS_GIT_REPO_BRANCH | string | no | `main` | Git branch to checkout. | -| ATP_STORAGE_PROVIDER | string | no | `"minio"` | Type of S3 storage (e.g., minio, aws). | -| ATP_TESTS_GIT_TOKEN | string | **yes** | `""` | Access token for private Git repositories with tests. | -| ATP_STORAGE_BUCKET | string | **yes** | `""` | S3 bucket name for uploading results. | -| ATP_STORAGE_USERNAME | string | **yes** | `""` | Access key for S3 bucket. | -| ATP_STORAGE_PASSWORD | string | **yes** | `""` | Secret key for S3 bucket. | -| ATP_STORAGE_SERVER_URL | string | **yes** | `""` | API endpoint for accessing S3 storage. | -| ATP_STORAGE_SERVER_UI_URL | string | **yes** | `""` | Web UI endpoint for viewing files in the S3 bucket. | -| ATP_REPORT_VIEW_UI_URL | string | **yes** | `""` | URL for viewing generated test reports. | -| CURRENT_DATE | string | no | `""` | Date to use in report naming (format: YYYY-MM-DD). | -| CURRENT_TIME | string | no | `""` | Time to use in report naming (format: HH:MM:SS). | -| ATP_RUNNER_JOB_TTL | integer | no | `43200` | Time-to-live for the test job in seconds. | -| ATP_RUNNER_JOB_EXIT_STRATEGY | integer | no | `0` | Delay in seconds before job termination (for debugging). | -| ENABLE_JIRA_INTEGRATION | boolean | no | `false` | Enable Jira integration for tests. | -| DEBUG_MODE | boolean | no | `false` | Enable additional debug behavior and logs in runner scripts. | -| ATP_MONITORING_ENABLED | boolean | no | `false` | Enable creation monitoring objects for runners. | -| SECURITY_CONTEXT_ENABLED | boolean | no | `false` | Flag to enable or disable the security context for the Playwright Runner service . | +| Parameter | Type | Mandatory | Default value | Description | +|-------------------------------------|---------|-----------|-------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| ENVIRONMENT_NAME | string | **yes** | `"default"` | Environment name (e.g., dev, test, prod). | +| ENV_CONFIGURATION_TEMPLATE_FILENAME | string | no | `environment-configuration-template.json` | Environment configuration template filename used during runtime configuration rendering. | +| ATP_TESTS_GIT_REPO_URL | string | **yes** | `""` | Git repository URL for cloning test sources. Git-URL-to-project-tests.git | +| ATP_TESTS_GIT_REPO_BRANCH | string | no | `main` | Git branch to checkout. | +| TEST_PARAMS | JSON | **yes** | `{}` | Specify what test or scope should be run, for example: `'{"execution_list":[{"type": "scope","name": "regression"}]}'` | +| ATP_ENVGENE_CONFIGURATION | JSON | no | `{}` | Additional test parameters (Systems) to pass to test runner from EnvGene. | +| ATP_TESTS_GIT_REPO_BRANCH | string | no | `main` | Git branch to checkout. | +| ATP_STORAGE_PROVIDER | string | no | `"minio"` | Type of S3 storage (e.g., minio, aws). | +| ATP_TESTS_GIT_TOKEN | string | **yes** | `""` | Access token for private Git repositories with tests. | +| ATP_STORAGE_BUCKET | string | **yes** | `""` | S3 bucket name for uploading results. | +| ATP_STORAGE_USERNAME | string | **yes** | `""` | Access key for S3 bucket. | +| ATP_STORAGE_PASSWORD | string | **yes** | `""` | Secret key for S3 bucket. | +| ATP_STORAGE_SERVER_URL | string | **yes** | `""` | API endpoint for accessing S3 storage. | +| ATP_STORAGE_SERVER_UI_URL | string | **yes** | `""` | Web UI endpoint for viewing files in the S3 bucket. | +| ATP_REPORT_VIEW_UI_URL | string | **yes** | `""` | URL for viewing generated test reports. | +| CURRENT_DATE | string | no | `""` | Date to use in report naming (format: YYYY-MM-DD). | +| CURRENT_TIME | string | no | `""` | Time to use in report naming (format: HH:MM:SS). | +| ATP_RUNNER_JOB_TTL | integer | no | `43200` | Time-to-live for the test job in seconds. | +| ATP_RUNNER_JOB_EXIT_STRATEGY | integer | no | `0` | Delay in seconds before job termination (for debugging). | +| ENABLE_JIRA_INTEGRATION | boolean | no | `false` | Enable Jira integration for tests. | +| DEBUG_MODE | boolean | no | `false` | Enable additional debug behavior and logs in runner scripts. | +| ATP_MONITORING_ENABLED | boolean | no | `false` | Enable creation monitoring objects for runners. | +| SECURITY_CONTEXT_ENABLED | boolean | no | `false` | Flag to enable or disable the security context for the Playwright Runner service . | +| EXTRA_VARS | string | no | `` | Passes additional environment variables to the test runner in the form of key-value pairs (e.g., `A=1;B=2`, `A=1,B=2`, or using newlines). Supports semicolon, comma delimiters. | ## Hardware / Resource Requirements (HWE) diff --git a/deployments/charts/atp3-python-runner/templates/job.yaml b/deployments/charts/atp3-python-runner/templates/job.yaml index 6385bb7..e23b431 100644 --- a/deployments/charts/atp3-python-runner/templates/job.yaml +++ b/deployments/charts/atp3-python-runner/templates/job.yaml @@ -73,6 +73,8 @@ spec: value: "{{ .Values.DEBUG_MODE }}" - name: TEST_PARAMS value: {{ toJson .Values.TEST_PARAMS | quote }} + - name: EXTRA_VARS + value: "{{ .Values.EXTRA_VARS }}" - name: ATP_ENVGENE_CONFIGURATION valueFrom: secretKeyRef: diff --git a/deployments/charts/atp3-python-runner/values.yaml b/deployments/charts/atp3-python-runner/values.yaml index b97a746..029a1e7 100644 --- a/deployments/charts/atp3-python-runner/values.yaml +++ b/deployments/charts/atp3-python-runner/values.yaml @@ -24,6 +24,7 @@ ATP_MONITORING_ENABLED: true # Security Context properties # enabled is a flag to enable Security Context SECURITY_CONTEXT_ENABLED: false +EXTRA_VARS: "" # runAsUser is the user ID used to run the container podSecurityContext: runAsUser: 1000 diff --git a/entrypoint.sh b/entrypoint.sh index da2c3f3..7e9ad1b 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -45,6 +45,8 @@ source /scripts/native-report.sh source /scripts/envgene.sh # shellcheck disable=SC1091 source /scripts/render-environment-configuration.sh +# shellcheck disable=SC1091 +source /scripts/parse-extra-vars.sh # Execute main workflow echo "🚀 Starting test execution workflow..." @@ -54,6 +56,7 @@ echo "🚀 Starting test execution workflow..." trap 'finalize_once' EXIT init_environment || fail "Environment initialization failed" +parse_extra_vars || fail "EXTRA_VARS parsing failed" clone_repository || fail "Repository clone failed" render_environment_configuration || fail "Render Environment Configuration Failed" load_envgene || fail "Load Envgen Failed" diff --git a/scripts b/scripts index 4443f5f..9d3412d 160000 --- a/scripts +++ b/scripts @@ -1 +1 @@ -Subproject commit 4443f5f8cb4032c8f2dc728df003803182c76e89 +Subproject commit 9d3412dfb8a4280440fd3c758130aaada964f545