From 98dbc41f452c45c5fca9000b483b13a14b764a7a Mon Sep 17 00:00:00 2001 From: Viet Nguyen Duc Date: Wed, 8 Jan 2025 19:35:15 +0700 Subject: [PATCH] [docs] Generate list environment variables README automatically (#2564) Signed-off-by: Viet Nguyen Duc --- Base/Dockerfile | 20 +- Distributor/Dockerfile | 6 +- ENV_VARIABLES.md | 121 ++++++ Hub/Dockerfile | 8 +- Makefile | 4 + NodeBase/Dockerfile | 48 +-- README.md | 19 + Router/Dockerfile | 4 +- SessionQueue/Dockerfile | 4 +- Sessions/Dockerfile | 6 +- Standalone/Dockerfile | 10 +- StandaloneDocker/Dockerfile | 6 +- Video/Dockerfile | 18 +- .../generate_list_env_vars/description.yaml | 362 ++++++++++++++++++ scripts/generate_list_env_vars/extract_env.py | 113 ++++++ scripts/generate_list_env_vars/value.yaml | 238 ++++++++++++ tests/charts/bootstrap.sh | 3 +- tests/requirements.txt | 1 + 18 files changed, 924 insertions(+), 67 deletions(-) create mode 100644 ENV_VARIABLES.md create mode 100644 scripts/generate_list_env_vars/description.yaml create mode 100644 scripts/generate_list_env_vars/extract_env.py create mode 100644 scripts/generate_list_env_vars/value.yaml diff --git a/Base/Dockerfile b/Base/Dockerfile index a52327ac71..6a163ab783 100644 --- a/Base/Dockerfile +++ b/Base/Dockerfile @@ -169,31 +169,31 @@ RUN /opt/bin/add-jks-helper.sh -d /opt/selenium/secrets \ # Configure environement #====================================== # Boolean value, maps "--bind-host" -ENV SE_BIND_HOST=false \ +ENV SE_BIND_HOST="false" \ SE_SERVER_PROTOCOL="http" \ CONFIG_FILE="/opt/selenium/config.toml" \ # Boolean value, maps "--reject-unsupported-caps" - SE_REJECT_UNSUPPORTED_CAPS=false \ - SE_OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED=true \ + SE_REJECT_UNSUPPORTED_CAPS="false" \ + SE_OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED="true" \ SE_OTEL_TRACES_EXPORTER="otlp" \ SE_SUPERVISORD_LOG_LEVEL="info" \ SE_SUPERVISORD_CHILD_LOG_DIR="/tmp" \ SE_SUPERVISORD_LOG_FILE="/tmp/supervisord.log" \ SE_SUPERVISORD_PID_FILE="/tmp/supervisord.pid" \ - SE_SUPERVISORD_AUTO_RESTART=true \ - SE_SUPERVISORD_START_RETRIES=5 \ + SE_SUPERVISORD_AUTO_RESTART="true" \ + SE_SUPERVISORD_START_RETRIES="5" \ SE_LOG_TIMESTAMP_FORMAT="%Y-%m-%d %H:%M:%S,%3N" \ SE_LOG_LEVEL="INFO" \ - SE_HTTP_LOGS=false \ - SE_STRUCTURED_LOGS=false \ - SE_ENABLE_TRACING=true \ - SE_ENABLE_TLS=false \ + SE_HTTP_LOGS="false" \ + SE_STRUCTURED_LOGS="false" \ + SE_ENABLE_TRACING="true" \ + SE_ENABLE_TLS="false" \ SE_JAVA_OPTS_DEFAULT="-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/selenium/logs" \ SE_JAVA_HEAP_DUMP="false" \ SE_JAVA_HTTPCLIENT_VERSION="HTTP_1_1" \ SE_JAVA_SSL_TRUST_STORE="/opt/selenium/secrets/server.jks" \ SE_JAVA_SSL_TRUST_STORE_PASSWORD="/opt/selenium/secrets/server.pass" \ - SE_JAVA_DISABLE_HOSTNAME_VERIFICATION=true \ + SE_JAVA_DISABLE_HOSTNAME_VERIFICATION="true" \ SE_HTTPS_CERTIFICATE="/opt/selenium/secrets/tls.crt" \ SE_HTTPS_PRIVATE_KEY="/opt/selenium/secrets/tls.key" diff --git a/Distributor/Dockerfile b/Distributor/Dockerfile index 5404ddce44..ca60593e9a 100644 --- a/Distributor/Dockerfile +++ b/Distributor/Dockerfile @@ -18,9 +18,9 @@ COPY --chown="${SEL_UID}:${SEL_GID}" start-selenium-grid-distributor.sh \ COPY selenium-grid-distributor.conf /etc/supervisor/conf.d/ # In seconds, maps to "--session-request-timeout" -ENV SE_SESSION_REQUEST_TIMEOUT=300 \ +ENV SE_SESSION_REQUEST_TIMEOUT="300" \ # In seconds, maps to "--session-retry-interval" - SE_SESSION_RETRY_INTERVAL=15 \ + SE_SESSION_RETRY_INTERVAL="15" \ # In seconds, maps to "--healthcheck-interval" - SE_HEALTHCHECK_INTERVAL=120 \ + SE_HEALTHCHECK_INTERVAL="120" \ SE_OTEL_SERVICE_NAME="selenium-distributor" diff --git a/ENV_VARIABLES.md b/ENV_VARIABLES.md new file mode 100644 index 0000000000..a1c49a9c4e --- /dev/null +++ b/ENV_VARIABLES.md @@ -0,0 +1,121 @@ +| ENV variable | Default value | Description | CLI option represent | +|--------------|---------------|-------------|----------------------| +| SE_SCREEN_WIDTH | 1920 | Use in Node to set the screen width | | +| SE_SCREEN_HEIGHT | 1080 | Use in Node to set the screen height | | +| SE_VIDEO_FILE_NAME | video.mp4 | Use in function video recording to set the output file name. Set `auto` for dynamic file name relying on test metadata | | +| SE_FRAME_RATE | 15 | Set the frame rate for FFmpeg in video recording | | +| SE_CODEC | libx264 | Set the codec for FFmpeg in video recording | | +| SE_PRESET | -preset ultrafast | Set the preset for FFmpeg in video recording | | +| SE_VIDEO_UPLOAD_ENABLED | false | Enable video upload | | +| SE_VIDEO_INTERNAL_UPLOAD | true | Enable video upload using Rclone in the same recorder container | | +| SE_UPLOAD_DESTINATION_PREFIX | | Remote name and destination path to upload | | +| SE_UPLOAD_PIPE_FILE_NAME | | Set the pipe file name for video upload to consume | | +| SE_SERVER_PROTOCOL | http | Protocol for communication between components | | +| SE_VIDEO_POLL_INTERVAL | 1 | | | +| SE_VIDEO_WAIT_ATTEMPTS | | | | +| SE_VIDEO_FILE_READY_WAIT_ATTEMPTS | | | | +| SE_VIDEO_WAIT_UPLOADER_SHUTDOWN_ATTEMPTS | | | | +| SE_LOG_TIMESTAMP_FORMAT | %Y-%m-%d %H:%M:%S,%3N | | | +| SE_VIDEO_RECORD_STANDALONE | | | | +| SE_NODE_PORT | | | --port | +| SE_ROUTER_USERNAME | | Set the username for basic authentication | --username | +| SE_ROUTER_PASSWORD | | Set the password for basic authentication | | +| SE_SUPERVISORD_PID_FILE | /tmp/supervisord.pid | Default pid file will be created by supervisord | | +| SE_DRAIN_AFTER_SESSION_COUNT | 0 | Drain and detach node from grid after session count exceeds | --drain-after-session-count | +| SE_SUB_PATH | | A sub-path that should be considered for all user facing routes on the Hub/Router/Standalone | --sub-path | +| SE_NODE_GRID_URL | | Node config, public URL of the Grid as a whole (typically the address of the Hub or the Router) | --grid-url | +| SE_HUB_HOST | | Hub config, host address the Hub should listen on | --host | +| SE_ROUTER_HOST | | Router config, host address the Router should listen on | --host | +| SE_HUB_PORT | | Hub config, port the Hub should listen on (default 4444) | --port | +| SE_ROUTER_PORT | | Router config, port the Router should listen on (default 4444) | --port | +| SE_NODE_GRID_GRAPHQL_URL | | Video recording config, GraphQL URL to query test metadata for dynamic file name | | +| SE_VIDEO_FILE_NAME_TRIM_REGEX | [:alnum:]-_ | Bash regex to trim the file name if it is too long | | +| SE_VIDEO_FILE_NAME_SUFFIX | | Append a suffix session id along with test metadata | | +| SE_RCLONE_CONFIG | | | | +| SE_UPLOAD_COMMAND | | | | +| SE_UPLOAD_OPTS | | | | +| SE_UPLOAD_RETAIN_LOCAL_FILE | | | | +| SE_VIDEO_UPLOAD_BATCH_CHECK | | | | +| SE_RCLONE_ | | | | +| SE_OPTS | | | | +| SE_EVENT_BUS_HOST | | | | +| SE_EVENT_BUS_PORT | | | | +| SE_LOG_LEVEL | INFO | | | +| SE_HTTP_LOGS | false | | | +| SE_STRUCTURED_LOGS | false | | | +| SE_EXTERNAL_URL | | | | +| SE_ENABLE_TLS | false | | | +| SE_JAVA_SSL_TRUST_STORE | /opt/selenium/secrets/server.jks | | | +| SE_JAVA_OPTS | | | | +| SE_JAVA_SSL_TRUST_STORE_PASSWORD | /opt/selenium/secrets/server.pass | | | +| SE_JAVA_DISABLE_HOSTNAME_VERIFICATION | true | | | +| SE_HTTPS_CERTIFICATE | /opt/selenium/secrets/tls.crt | | | +| SE_HTTPS_PRIVATE_KEY | /opt/selenium/secrets/tls.key | | | +| SE_ENABLE_TRACING | true | | | +| SE_OTEL_EXPORTER_ENDPOINT | | | | +| SE_OTEL_SERVICE_NAME | selenium-router | | | +| SE_OTEL_JVM_ARGS | | | | +| SE_OTEL_TRACES_EXPORTER | otlp | | | +| SE_OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED | true | | | +| SE_JAVA_HTTPCLIENT_VERSION | HTTP_1_1 | | | +| SE_JAVA_OPTS_DEFAULT | -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/selenium/logs | | | +| SE_JAVA_HEAP_DUMP | false | | | +| SE_BIND_HOST | false | | | +| SE_SCREEN_DEPTH | 24 | | | +| SE_SCREEN_DPI | 96 | | | +| SE_START_XVFB | true | | | +| SE_START_VNC | true | | | +| SE_START_NO_VNC | true | | | +| SE_VNC_ULIMIT | | | | +| SE_NO_VNC_PORT | 7900 | | | +| SE_VNC_PORT | 5900 | | | +| SE_VNC_NO_PASSWORD | | | | +| SE_VNC_VIEW_ONLY | | | | +| SE_VNC_PASSWORD | | | | +| SE_EVENT_BUS_PUBLISH_PORT | | | | +| SE_EVENT_BUS_SUBSCRIBE_PORT | | | | +| SE_NODE_SESSION_TIMEOUT | 300 | | | +| SE_NODE_ENABLE_MANAGED_DOWNLOADS | | | | +| SE_NODE_ENABLE_CDP | | | | +| SE_NODE_REGISTER_PERIOD | | | | +| SE_NODE_REGISTER_CYCLE | | | | +| SE_NODE_HEARTBEAT_PERIOD | 30 | | | +| SE_REGISTRATION_SECRET | | | | +| SE_BROWSER_LEFTOVERS_PROCESSES_SECS | 7200 | | | +| SE_BROWSER_LEFTOVERS_TEMPFILES_DAYS | 1 | | | +| SE_BROWSER_LEFTOVERS_INTERVAL_SECS | 3600 | | | +| SE_DISABLE_UI | | | | +| SE_REJECT_UNSUPPORTED_CAPS | false | | | +| SE_NEW_SESSION_THREAD_POOL_SIZE | | | | +| SE_SESSION_REQUEST_TIMEOUT | 300 | | | +| SE_SESSION_RETRY_INTERVAL | 5 | | | +| SE_HEALTHCHECK_INTERVAL | 120 | | | +| SE_RELAX_CHECKS | true | | | +| SE_SESSION_QUEUE_HOST | | | | +| SE_SESSION_QUEUE_PORT | | | | +| SE_VIDEO_FOLDER | | | | +| SE_LOG_LISTEN_GRAPHQL | | | | +| SE_NODE_PRESTOP_WAIT_STRATEGY | | | | +| SE_SESSIONS_HOST | | | | +| SE_SESSIONS_PORT | | | | +| SE_SESSIONS_MAP_EXTERNAL_DATASTORE | false | | | +| SE_SESSIONS_MAP_HOST | | | | +| SE_SESSIONS_MAP_PORT | | | | +| SE_DISTRIBUTOR_HOST | | | | +| SE_DISTRIBUTOR_PORT | | | | +| SE_GRID_URL | | | | +| SE_NODE_DOCKER_CONFIG_FILENAME | | | | +| SE_NODE_GRACEFUL_SHUTDOWN | | | | +| SE_VIDEO_CONTAINER_NAME | | | | +| SE_RECORD_VIDEO | true | | | +| SE_ENABLE_BROWSER_LEFTOVERS_CLEANUP | false | | | +| SE_NODE_MAX_SESSIONS | 1 | | | +| SE_NODE_OVERRIDE_MAX_SESSIONS | false | | | +| SE_OFFLINE | true | Selenium Manager offline mode, use the browser and driver pre-configured in the image | | +| SE_NODE_BROWSER_VERSION | stable | Overwrite the default browserVersion in Node stereotype | | +| SE_NODE_PLATFORM_NAME | Linux | Overwrite the default platformName in Node stereotype | | +| SE_SUPERVISORD_LOG_LEVEL | info | | | +| SE_SUPERVISORD_CHILD_LOG_DIR | /tmp | | | +| SE_SUPERVISORD_LOG_FILE | /tmp/supervisord.log | | | +| SE_SUPERVISORD_AUTO_RESTART | true | | | +| SE_SUPERVISORD_START_RETRIES | 5 | | | diff --git a/Hub/Dockerfile b/Hub/Dockerfile index ba6fb8ee55..0d2d87bb7d 100644 --- a/Hub/Dockerfile +++ b/Hub/Dockerfile @@ -15,13 +15,13 @@ EXPOSE 4443 EXPOSE 4444 # In seconds, maps to "--session-request-timeout" -ENV SE_SESSION_REQUEST_TIMEOUT=300 \ +ENV SE_SESSION_REQUEST_TIMEOUT="300" \ # In seconds, maps to "--session-retry-interval" - SE_SESSION_RETRY_INTERVAL=15 \ + SE_SESSION_RETRY_INTERVAL="15" \ # In seconds, maps to "--healthcheck-interval" - SE_HEALTHCHECK_INTERVAL=120 \ + SE_HEALTHCHECK_INTERVAL="120" \ # Boolean value, maps "--relax-checks" - SE_RELAX_CHECKS=true \ + SE_RELAX_CHECKS="true" \ SE_OTEL_SERVICE_NAME="selenium-hub" COPY --chown="${SEL_UID}:${SEL_GID}" start-selenium-grid-hub.sh \ diff --git a/Makefile b/Makefile index 1e6c855539..c3f66a0a7e 100644 --- a/Makefile +++ b/Makefile @@ -88,6 +88,10 @@ generate_readme_charts: $$HOME/go/bin/helm-docs --chart-search-root charts/selenium-grid --output-file CONFIGURATION.md --sort-values-order file ; \ fi +update_list_env_vars: + python3 -m pip install -r tests/requirements.txt ; \ + python3 scripts/generate_list_env_vars/extract_env.py + lint_readme_charts: generate_readme_charts git diff --stat --exit-code ; \ EXIT_CODE=$$? ; \ diff --git a/NodeBase/Dockerfile b/NodeBase/Dockerfile index 0019df3dfb..ccd4265ca3 100644 --- a/NodeBase/Dockerfile +++ b/NodeBase/Dockerfile @@ -31,22 +31,22 @@ ENV LANG_WHICH=${LANG_WHICH} \ #============================================ # Shared cleanup script environment variables #============================================ - SE_ENABLE_BROWSER_LEFTOVERS_CLEANUP=false \ - SE_BROWSER_LEFTOVERS_INTERVAL_SECS=3600 \ - SE_BROWSER_LEFTOVERS_PROCESSES_SECS=7200 \ - SE_BROWSER_LEFTOVERS_TEMPFILES_DAYS=1 \ + SE_ENABLE_BROWSER_LEFTOVERS_CLEANUP="false" \ + SE_BROWSER_LEFTOVERS_INTERVAL_SECS="3600" \ + SE_BROWSER_LEFTOVERS_PROCESSES_SECS="7200" \ + SE_BROWSER_LEFTOVERS_TEMPFILES_DAYS="1" \ #======================== # Selenium Configuration #======================== # Drain the Node after N sessions (a value higher than zero enables the feature) - SE_DRAIN_AFTER_SESSION_COUNT=0 \ - SE_NODE_MAX_SESSIONS=1 \ - SE_NODE_SESSION_TIMEOUT=300 \ - SE_NODE_OVERRIDE_MAX_SESSIONS=false \ - SE_NODE_HEARTBEAT_PERIOD=30 \ + SE_DRAIN_AFTER_SESSION_COUNT="0" \ + SE_NODE_MAX_SESSIONS="1" \ + SE_NODE_SESSION_TIMEOUT="300" \ + SE_NODE_OVERRIDE_MAX_SESSIONS="false" \ + SE_NODE_HEARTBEAT_PERIOD="30" \ SE_OTEL_SERVICE_NAME="selenium-node" \ # Setting Selenium Manager to work offline - SE_OFFLINE=true \ + SE_OFFLINE="true" \ SE_NODE_BROWSER_VERSION="stable" \ SE_NODE_PLATFORM_NAME="Linux" \ #============================ @@ -54,22 +54,22 @@ ENV LANG_WHICH=${LANG_WHICH} \ #============================ SE_RECORD_VIDEO=false \ DISPLAY_CONTAINER_NAME="localhost" \ - SE_SCREEN_WIDTH=1920 \ - SE_SCREEN_HEIGHT=1080 \ - SE_SCREEN_DEPTH=24 \ - SE_SCREEN_DPI=96 \ - SE_START_XVFB=true \ - SE_START_VNC=true \ - SE_START_NO_VNC=true \ - SE_NO_VNC_PORT=7900 \ - SE_VNC_PORT=5900 \ - DISPLAY=:99.0 \ - DISPLAY_NUM=99 \ + SE_SCREEN_WIDTH="1920" \ + SE_SCREEN_HEIGHT="1080" \ + SE_SCREEN_DEPTH="24" \ + SE_SCREEN_DPI="96" \ + SE_START_XVFB="true" \ + SE_START_VNC="true" \ + SE_START_NO_VNC="true" \ + SE_NO_VNC_PORT="7900" \ + SE_VNC_PORT="5900" \ + DISPLAY=":99.0" \ + DISPLAY_NUM="99" \ # Path to the Configfile - CONFIG_FILE=/opt/selenium/config.toml \ - GENERATE_CONFIG=true \ + CONFIG_FILE="/opt/selenium/config.toml" \ + GENERATE_CONFIG="true" \ # Following line fixes https://github.com/SeleniumHQ/docker-selenium/issues/87 - DBUS_SESSION_BUS_ADDRESS=/dev/null + DBUS_SESSION_BUS_ADDRESS="/dev/null" RUN apt-get update -qqy \ && apt-get -qqy --no-install-recommends install \ diff --git a/README.md b/README.md index 03049c7cb3..edf612114e 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ Talk to us at https://www.selenium.dev/support/ * [Dev and Beta Channel Browser Images](#dev-and-beta-channel-browser-images) * [Dev and Beta Standalone Mode](#dev-and-beta-standalone-mode) * [Dev and Beta on the Grid](#dev-and-beta-on-the-grid) +* [Environment Variables](#environment-variables) * [Execution modes](#execution-modes) * [Standalone](#standalone) * [Hub and Nodes](#hub-and-nodes) @@ -348,6 +349,24 @@ services: For more information on the Dev and Beta channel container images, see the blog post on [Dev and Beta Channel Browsers via Docker Selenium](https://www.selenium.dev/blog/2022/dev-and-beta-channel-browsers-via-docker-selenium/). +## Environment Variables + +**Checkout full list of environment variables [here](ENV_VARIABLES.md).** + +How to update or contribute to list of environment variables? Follow below steps: + +1. Refresh the list to pick up new environment variables or default value + + ```bash + make update_list_env_vars + ``` + + The script can be updated in [scripts/generate_list_env_vars/extract_env.py](scripts/generate_list_env_vars/extract_env.py). + +2. Update the description for each environment variable in the file [scripts/generate_list_env_vars/description.yaml](scripts/generate_list_env_vars/description.yaml). + +3. Run the command in step (1) one more time to update the list of environment variables with new descriptions. + ## Execution modes ### Standalone diff --git a/Router/Dockerfile b/Router/Dockerfile index 02b8c7172e..1ca285af5c 100644 --- a/Router/Dockerfile +++ b/Router/Dockerfile @@ -11,9 +11,9 @@ USER ${SEL_UID} #======================== # In seconds, maps to "--session-request-timeout" -ENV SE_SESSION_REQUEST_TIMEOUT=300 \ +ENV SE_SESSION_REQUEST_TIMEOUT="300" \ # In seconds, maps to "--session-retry-interval" - SE_SESSION_RETRY_INTERVAL=5 \ + SE_SESSION_RETRY_INTERVAL="5" \ SE_OTEL_SERVICE_NAME="selenium-router" EXPOSE 4444 diff --git a/SessionQueue/Dockerfile b/SessionQueue/Dockerfile index 2b8866e1c1..0330c6511e 100644 --- a/SessionQueue/Dockerfile +++ b/SessionQueue/Dockerfile @@ -11,9 +11,9 @@ USER ${SEL_UID} #======================== # In seconds, maps to "--session-request-timeout" -ENV SE_SESSION_REQUEST_TIMEOUT=300 \ +ENV SE_SESSION_REQUEST_TIMEOUT="300" \ # In seconds, maps to "--session-retry-interval" - SE_SESSION_RETRY_INTERVAL=15 \ + SE_SESSION_RETRY_INTERVAL="15" \ SE_OTEL_SERVICE_NAME="selenium-session-queue" EXPOSE 5559 diff --git a/Sessions/Dockerfile b/Sessions/Dockerfile index 66f7ceed7d..5c981dd8dc 100644 --- a/Sessions/Dockerfile +++ b/Sessions/Dockerfile @@ -22,6 +22,6 @@ EXPOSE 5556 ENV SE_OTEL_SERVICE_NAME="selenium-session-map" \ # Path to the Configfile - CONFIG_FILE=/opt/selenium/config.toml \ - GENERATE_CONFIG=true \ - SE_SESSIONS_MAP_EXTERNAL_DATASTORE=false + CONFIG_FILE="/opt/selenium/config.toml" \ + GENERATE_CONFIG="true" \ + SE_SESSIONS_MAP_EXTERNAL_DATASTORE="false" diff --git a/Standalone/Dockerfile b/Standalone/Dockerfile index 6575b4fca6..c9ade60c4b 100644 --- a/Standalone/Dockerfile +++ b/Standalone/Dockerfile @@ -21,14 +21,14 @@ COPY selenium.conf /etc/supervisor/conf.d/ COPY --chown="${SEL_UID}:${SEL_GID}" generate_config /opt/bin/generate_config # In seconds, maps to "--session-request-timeout" -ENV SE_SESSION_REQUEST_TIMEOUT=300 \ +ENV SE_SESSION_REQUEST_TIMEOUT="300" \ # In seconds, maps to "--session-retry-interval" - SE_SESSION_RETRY_INTERVAL=15 \ + SE_SESSION_RETRY_INTERVAL="15" \ # In seconds, maps to "--healthcheck-interval" - SE_HEALTHCHECK_INTERVAL=120 \ + SE_HEALTHCHECK_INTERVAL="120" \ # Boolean value, maps "--relax-checks" - SE_RELAX_CHECKS=true \ - SE_REJECT_UNSUPPORTED_CAPS=true \ + SE_RELAX_CHECKS="true" \ + SE_REJECT_UNSUPPORTED_CAPS="true" \ SE_OTEL_SERVICE_NAME="selenium-standalone" EXPOSE 4444 diff --git a/StandaloneDocker/Dockerfile b/StandaloneDocker/Dockerfile index 80a7c9632b..d1ffcf4af9 100644 --- a/StandaloneDocker/Dockerfile +++ b/StandaloneDocker/Dockerfile @@ -15,9 +15,9 @@ EXPOSE 4444 COPY --chown="${SEL_UID}:${SEL_GID}" start-selenium-grid-docker.sh /opt/bin/ # In seconds, maps to "--session-request-timeout" -ENV SE_SESSION_REQUEST_TIMEOUT=300 \ +ENV SE_SESSION_REQUEST_TIMEOUT="300" \ # In seconds, maps to "--session-retry-interval" - SE_SESSION_RETRY_INTERVAL=15 \ + SE_SESSION_RETRY_INTERVAL="15" \ # Boolean value, maps "--relax-checks" - SE_RELAX_CHECKS=true \ + SE_RELAX_CHECKS="true" \ SE_OTEL_SERVICE_NAME="selenium-standalone-docker" diff --git a/Video/Dockerfile b/Video/Dockerfile index 1c92988291..efac89a5cc 100644 --- a/Video/Dockerfile +++ b/Video/Dockerfile @@ -32,23 +32,23 @@ RUN ffmpeg -version \ && rclone --version \ && touch /opt/selenium/upload.conf -ENV DISPLAY_NUM=99 \ +ENV DISPLAY_NUM="99" \ DISPLAY_CONTAINER_NAME="selenium" \ - SE_RECORD_VIDEO=true \ + SE_RECORD_VIDEO="true" \ SE_SERVER_PROTOCOL="http" \ - SE_VIDEO_POLL_INTERVAL=1 \ - SE_SCREEN_WIDTH=1920 \ - SE_SCREEN_HEIGHT=1080 \ - SE_FRAME_RATE=15 \ + SE_VIDEO_POLL_INTERVAL="1" \ + SE_SCREEN_WIDTH="1920" \ + SE_SCREEN_HEIGHT="1080" \ + SE_FRAME_RATE="15" \ SE_CODEC="libx264" \ SE_PRESET="-preset ultrafast" \ VIDEO_FOLDER="/videos" \ - SE_VIDEO_FILE_NAME=video.mp4 \ + SE_VIDEO_FILE_NAME="video.mp4" \ SE_VIDEO_FILE_NAME_TRIM_REGEX="[:alnum:]-_" \ # Environment variables for the uploader RCLONE_CONFIG="/opt/selenium/upload.conf" \ - SE_VIDEO_UPLOAD_ENABLED=false \ - SE_VIDEO_INTERNAL_UPLOAD=true \ + SE_VIDEO_UPLOAD_ENABLED="false" \ + SE_VIDEO_INTERNAL_UPLOAD="true" \ SE_UPLOAD_DESTINATION_PREFIX="" EXPOSE 9000 diff --git a/scripts/generate_list_env_vars/description.yaml b/scripts/generate_list_env_vars/description.yaml new file mode 100644 index 0000000000..6fb8a1373d --- /dev/null +++ b/scripts/generate_list_env_vars/description.yaml @@ -0,0 +1,362 @@ +- name: SE_SCREEN_WIDTH + description: Use in Node to set the screen width + cli: '' +- name: SE_SCREEN_HEIGHT + description: Use in Node to set the screen height + cli: '' +- name: SE_VIDEO_FILE_NAME + description: Use in function video recording to set the output file name. Set `auto` + for dynamic file name relying on test metadata + cli: '' +- name: SE_FRAME_RATE + description: Set the frame rate for FFmpeg in video recording + cli: '' +- name: SE_CODEC + description: Set the codec for FFmpeg in video recording + cli: '' +- name: SE_PRESET + description: Set the preset for FFmpeg in video recording + cli: '' +- name: SE_VIDEO_UPLOAD_ENABLED + description: Enable video upload + cli: '' +- name: SE_VIDEO_INTERNAL_UPLOAD + description: Enable video upload using Rclone in the same recorder container + cli: '' +- name: SE_UPLOAD_DESTINATION_PREFIX + description: Remote name and destination path to upload + cli: '' +- name: SE_UPLOAD_PIPE_FILE_NAME + description: Set the pipe file name for video upload to consume + cli: '' +- name: SE_SERVER_PROTOCOL + description: Protocol for communication between components + cli: '' +- name: SE_VIDEO_POLL_INTERVAL + description: '' + cli: '' +- name: SE_VIDEO_WAIT_ATTEMPTS + description: '' + cli: '' +- name: SE_VIDEO_FILE_READY_WAIT_ATTEMPTS + description: '' + cli: '' +- name: SE_VIDEO_WAIT_UPLOADER_SHUTDOWN_ATTEMPTS + description: '' + cli: '' +- name: SE_LOG_TIMESTAMP_FORMAT + description: '' + cli: '' +- name: SE_VIDEO_RECORD_STANDALONE + description: '' + cli: '' +- name: SE_NODE_PORT + description: '' + cli: --port +- name: SE_ROUTER_USERNAME + description: Set the username for basic authentication + cli: --username +- name: SE_ROUTER_PASSWORD + description: Set the password for basic authentication + cli: '' +- name: SE_SUPERVISORD_PID_FILE + description: Default pid file will be created by supervisord + cli: '' +- name: SE_DRAIN_AFTER_SESSION_COUNT + description: Drain and detach node from grid after session count exceeds + cli: --drain-after-session-count +- name: SE_SUB_PATH + description: A sub-path that should be considered for all user facing routes on + the Hub/Router/Standalone + cli: --sub-path +- name: SE_NODE_GRID_URL + description: Node config, public URL of the Grid as a whole (typically the address + of the Hub or the Router) + cli: --grid-url +- name: SE_HUB_HOST + description: Hub config, host address the Hub should listen on + cli: --host +- name: SE_ROUTER_HOST + description: Router config, host address the Router should listen on + cli: --host +- name: SE_HUB_PORT + description: Hub config, port the Hub should listen on (default 4444) + cli: --port +- name: SE_ROUTER_PORT + description: Router config, port the Router should listen on (default 4444) + cli: --port +- name: SE_NODE_GRID_GRAPHQL_URL + description: Video recording config, GraphQL URL to query test metadata for dynamic + file name + cli: '' +- name: SE_VIDEO_FILE_NAME_TRIM_REGEX + description: Bash regex to trim the file name if it is too long + cli: '' +- name: SE_VIDEO_FILE_NAME_SUFFIX + description: Append a suffix session id along with test metadata + cli: '' +- name: SE_RCLONE_CONFIG + description: '' + cli: '' +- name: SE_UPLOAD_COMMAND + description: '' + cli: '' +- name: SE_UPLOAD_OPTS + description: '' + cli: '' +- name: SE_UPLOAD_RETAIN_LOCAL_FILE + description: '' + cli: '' +- name: SE_VIDEO_UPLOAD_BATCH_CHECK + description: '' + cli: '' +- name: SE_RCLONE_ + description: '' + cli: '' +- name: SE_OPTS + description: '' + cli: '' +- name: SE_EVENT_BUS_HOST + description: '' + cli: '' +- name: SE_EVENT_BUS_PORT + description: '' + cli: '' +- name: SE_LOG_LEVEL + description: '' + cli: '' +- name: SE_HTTP_LOGS + description: '' + cli: '' +- name: SE_STRUCTURED_LOGS + description: '' + cli: '' +- name: SE_EXTERNAL_URL + description: '' + cli: '' +- name: SE_ENABLE_TLS + description: '' + cli: '' +- name: SE_JAVA_SSL_TRUST_STORE + description: '' + cli: '' +- name: SE_JAVA_OPTS + description: '' + cli: '' +- name: SE_JAVA_SSL_TRUST_STORE_PASSWORD + description: '' + cli: '' +- name: SE_JAVA_DISABLE_HOSTNAME_VERIFICATION + description: '' + cli: '' +- name: SE_HTTPS_CERTIFICATE + description: '' + cli: '' +- name: SE_HTTPS_PRIVATE_KEY + description: '' + cli: '' +- name: SE_ENABLE_TRACING + description: '' + cli: '' +- name: SE_OTEL_EXPORTER_ENDPOINT + description: '' + cli: '' +- name: SE_OTEL_SERVICE_NAME + description: '' + cli: '' +- name: SE_OTEL_JVM_ARGS + description: '' + cli: '' +- name: SE_OTEL_TRACES_EXPORTER + description: '' + cli: '' +- name: SE_OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED + description: '' + cli: '' +- name: SE_JAVA_HTTPCLIENT_VERSION + description: '' + cli: '' +- name: SE_JAVA_OPTS_DEFAULT + description: '' + cli: '' +- name: SE_JAVA_HEAP_DUMP + description: '' + cli: '' +- name: SE_BIND_HOST + description: '' + cli: '' +- name: SE_SCREEN_DEPTH + description: '' + cli: '' +- name: SE_SCREEN_DPI + description: '' + cli: '' +- name: SE_START_XVFB + description: '' + cli: '' +- name: SE_START_VNC + description: '' + cli: '' +- name: SE_START_NO_VNC + description: '' + cli: '' +- name: SE_VNC_ULIMIT + description: '' + cli: '' +- name: SE_NO_VNC_PORT + description: '' + cli: '' +- name: SE_VNC_PORT + description: '' + cli: '' +- name: SE_VNC_NO_PASSWORD + description: '' + cli: '' +- name: SE_VNC_VIEW_ONLY + description: '' + cli: '' +- name: SE_VNC_PASSWORD + description: '' + cli: '' +- name: SE_EVENT_BUS_PUBLISH_PORT + description: '' + cli: '' +- name: SE_EVENT_BUS_SUBSCRIBE_PORT + description: '' + cli: '' +- name: SE_NODE_SESSION_TIMEOUT + description: '' + cli: '' +- name: SE_NODE_ENABLE_MANAGED_DOWNLOADS + description: '' + cli: '' +- name: SE_NODE_ENABLE_CDP + description: '' + cli: '' +- name: SE_NODE_REGISTER_PERIOD + description: '' + cli: '' +- name: SE_NODE_REGISTER_CYCLE + description: '' + cli: '' +- name: SE_NODE_HEARTBEAT_PERIOD + description: '' + cli: '' +- name: SE_REGISTRATION_SECRET + description: '' + cli: '' +- name: SE_BROWSER_LEFTOVERS_PROCESSES_SECS + description: '' + cli: '' +- name: SE_BROWSER_LEFTOVERS_TEMPFILES_DAYS + description: '' + cli: '' +- name: SE_BROWSER_LEFTOVERS_INTERVAL_SECS + description: '' + cli: '' +- name: SE_DISABLE_UI + description: '' + cli: '' +- name: SE_REJECT_UNSUPPORTED_CAPS + description: '' + cli: '' +- name: SE_NEW_SESSION_THREAD_POOL_SIZE + description: '' + cli: '' +- name: SE_SESSION_REQUEST_TIMEOUT + description: '' + cli: '' +- name: SE_SESSION_RETRY_INTERVAL + description: '' + cli: '' +- name: SE_HEALTHCHECK_INTERVAL + description: '' + cli: '' +- name: SE_RELAX_CHECKS + description: '' + cli: '' +- name: SE_SESSION_QUEUE_HOST + description: '' + cli: '' +- name: SE_SESSION_QUEUE_PORT + description: '' + cli: '' +- name: SE_VIDEO_FOLDER + description: '' + cli: '' +- name: SE_LOG_LISTEN_GRAPHQL + description: '' + cli: '' +- name: SE_NODE_PRESTOP_WAIT_STRATEGY + description: '' + cli: '' +- name: SE_SESSIONS_HOST + description: '' + cli: '' +- name: SE_SESSIONS_PORT + description: '' + cli: '' +- name: SE_SESSIONS_MAP_EXTERNAL_DATASTORE + description: '' + cli: '' +- name: SE_SESSIONS_MAP_HOST + description: '' + cli: '' +- name: SE_SESSIONS_MAP_PORT + description: '' + cli: '' +- name: SE_DISTRIBUTOR_HOST + description: '' + cli: '' +- name: SE_DISTRIBUTOR_PORT + description: '' + cli: '' +- name: SE_GRID_URL + description: '' + cli: '' +- name: SE_NODE_DOCKER_CONFIG_FILENAME + description: '' + cli: '' +- name: SE_NODE_GRACEFUL_SHUTDOWN + description: '' + cli: '' +- name: SE_VIDEO_CONTAINER_NAME + description: '' + cli: '' +- name: SE_RECORD_VIDEO + description: '' + cli: '' +- name: SE_ENABLE_BROWSER_LEFTOVERS_CLEANUP + description: '' + cli: '' +- name: SE_NODE_MAX_SESSIONS + description: '' + cli: '' +- name: SE_NODE_OVERRIDE_MAX_SESSIONS + description: '' + cli: '' +- name: SE_OFFLINE + description: Selenium Manager offline mode, use the browser and driver pre-configured + in the image + cli: '' +- name: SE_NODE_BROWSER_VERSION + description: Overwrite the default browserVersion in Node stereotype + cli: '' +- name: SE_NODE_PLATFORM_NAME + description: Overwrite the default platformName in Node stereotype + cli: '' +- name: SE_SUPERVISORD_LOG_LEVEL + description: '' + cli: '' +- name: SE_SUPERVISORD_CHILD_LOG_DIR + description: '' + cli: '' +- name: SE_SUPERVISORD_LOG_FILE + description: '' + cli: '' +- name: SE_SUPERVISORD_AUTO_RESTART + description: '' + cli: '' +- name: SE_SUPERVISORD_START_RETRIES + description: '' + cli: '' diff --git a/scripts/generate_list_env_vars/extract_env.py b/scripts/generate_list_env_vars/extract_env.py new file mode 100644 index 0000000000..c71600b0db --- /dev/null +++ b/scripts/generate_list_env_vars/extract_env.py @@ -0,0 +1,113 @@ +import os +import re +import yaml +from collections import OrderedDict + +def extract_variables_from_shell_scripts(directory_path): + variables = OrderedDict() + for root, _, files in os.walk(directory_path): + for file in files: + if file.endswith(".sh"): + file_path = os.path.join(root, file) + try: + with open(file_path, 'r') as f: + content = f.read() + pattern = r'\b(SE_[A-Za-z0-9_]+)\b' + matches = re.findall(pattern, content) + for var in matches: + variables[var] = "" + except Exception as e: + print(f"Error reading file {file_path}: {e}") + return variables + +def extract_variables_from_dockerfiles(directory_path): + variables = OrderedDict() + for root, _, files in os.walk(directory_path): + for file in files: + if file.startswith("Dockerfile"): + file_path = os.path.join(root, file) + try: + with open(file_path, 'r') as f: + content = f.read() + pattern = r'\b(SE_[A-Za-z0-9_]+)\s*=\s*["\']([^"\']*)["\']' + matches = re.findall(pattern, content) + for var, value in matches: + variables[var] = value + except Exception as e: + print(f"Error reading file {file_path}: {e}") + return variables + +def combine_dictionaries(dict1, dict2): + combined_dict = OrderedDict(dict1) + combined_dict.update(dict2) + return combined_dict + +def read_description_yaml(file_path): + with open(file_path, 'r') as file: + data = yaml.safe_load(file) + return data if data is not None else [] + +def update_description_yaml(description, combined_vars): + for var, value in combined_vars.items(): + if not any(item['name'] == var for item in description): + description.append({'name': var, 'default': value, 'description': '', 'cli': ''}) + return description + +def dump_to_yaml(data, file_path): + with open(file_path, 'w') as file: + yaml.dump(data, file, default_flow_style=False, sort_keys=False, allow_unicode=True, encoding='utf-8') + +def write_value_file(combined_vars, file_path): + data = [{'name': key, 'default': value} for key, value in combined_vars.items()] + dump_to_yaml(data, file_path) + +def write_description_file(description, file_path): + data = [{'name': item['name'], 'description': item['description'], 'cli': item['cli']} for item in description] + dump_to_yaml(data, file_path) + +# Example usage +directory_path = os.getcwd() +description_file = f"{os.getcwd()}/scripts/generate_list_env_vars/description.yaml" +value_file = f"{os.getcwd()}/scripts/generate_list_env_vars/value.yaml" +output_file = f"{os.getcwd()}/ENV_VARIABLES.md" + +shell_variables = extract_variables_from_shell_scripts(directory_path) +dockerfile_variables = extract_variables_from_dockerfiles(directory_path) +combined_variables = combine_dictionaries(shell_variables, dockerfile_variables) + +description = read_description_yaml(description_file) +updated_description = update_description_yaml(description, combined_variables) + +dump_to_yaml(updated_description, description_file) +write_value_file(combined_variables, value_file) +write_description_file(updated_description, description_file) + +print(f"Updated description saved to {description_file}") +print(f"Value file saved to {value_file}") + +def render_markdown_table(description, values): + table = "| ENV variable | Default value | Description | CLI option represent |\n" + table += "|--------------|---------------|-------------|----------------------|\n" + + value_dict = {item['name']: item['default'] for item in values} + + for item in description: + name = item['name'] + default = value_dict.get(name, "") + des = item.get('description', "") + cli = item.get('cli', "") + table += f"| {name} | {default} | {des} | {cli} |\n" + + return table + +def write_markdown_to_file(markdown, file_path): + with open(file_path, 'w') as file: + file.write(markdown) + +description = read_description_yaml(description_file) +values = read_description_yaml(value_file) + +markdown_table = render_markdown_table(description, values) +write_markdown_to_file(markdown_table, output_file) + +print(f"Markdown table saved to {output_file}") diff --git a/scripts/generate_list_env_vars/value.yaml b/scripts/generate_list_env_vars/value.yaml new file mode 100644 index 0000000000..c574df4bdb --- /dev/null +++ b/scripts/generate_list_env_vars/value.yaml @@ -0,0 +1,238 @@ +- name: SE_SCREEN_WIDTH + default: '1920' +- name: SE_SCREEN_HEIGHT + default: '1080' +- name: SE_VIDEO_FILE_NAME + default: video.mp4 +- name: SE_FRAME_RATE + default: '15' +- name: SE_CODEC + default: libx264 +- name: SE_PRESET + default: -preset ultrafast +- name: SE_VIDEO_UPLOAD_ENABLED + default: 'false' +- name: SE_VIDEO_INTERNAL_UPLOAD + default: 'true' +- name: SE_UPLOAD_DESTINATION_PREFIX + default: '' +- name: SE_UPLOAD_PIPE_FILE_NAME + default: '' +- name: SE_SERVER_PROTOCOL + default: http +- name: SE_VIDEO_POLL_INTERVAL + default: '1' +- name: SE_VIDEO_WAIT_ATTEMPTS + default: '' +- name: SE_VIDEO_FILE_READY_WAIT_ATTEMPTS + default: '' +- name: SE_VIDEO_WAIT_UPLOADER_SHUTDOWN_ATTEMPTS + default: '' +- name: SE_LOG_TIMESTAMP_FORMAT + default: '%Y-%m-%d %H:%M:%S,%3N' +- name: SE_VIDEO_RECORD_STANDALONE + default: '' +- name: SE_NODE_PORT + default: '' +- name: SE_ROUTER_USERNAME + default: '' +- name: SE_ROUTER_PASSWORD + default: '' +- name: SE_SUPERVISORD_PID_FILE + default: /tmp/supervisord.pid +- name: SE_DRAIN_AFTER_SESSION_COUNT + default: '0' +- name: SE_SUB_PATH + default: '' +- name: SE_NODE_GRID_URL + default: '' +- name: SE_HUB_HOST + default: '' +- name: SE_ROUTER_HOST + default: '' +- name: SE_HUB_PORT + default: '' +- name: SE_ROUTER_PORT + default: '' +- name: SE_NODE_GRID_GRAPHQL_URL + default: '' +- name: SE_VIDEO_FILE_NAME_TRIM_REGEX + default: '[:alnum:]-_' +- name: SE_VIDEO_FILE_NAME_SUFFIX + default: '' +- name: SE_RCLONE_CONFIG + default: '' +- name: SE_UPLOAD_COMMAND + default: '' +- name: SE_UPLOAD_OPTS + default: '' +- name: SE_UPLOAD_RETAIN_LOCAL_FILE + default: '' +- name: SE_VIDEO_UPLOAD_BATCH_CHECK + default: '' +- name: SE_RCLONE_ + default: '' +- name: SE_OPTS + default: '' +- name: SE_EVENT_BUS_HOST + default: '' +- name: SE_EVENT_BUS_PORT + default: '' +- name: SE_LOG_LEVEL + default: INFO +- name: SE_HTTP_LOGS + default: 'false' +- name: SE_STRUCTURED_LOGS + default: 'false' +- name: SE_EXTERNAL_URL + default: '' +- name: SE_ENABLE_TLS + default: 'false' +- name: SE_JAVA_SSL_TRUST_STORE + default: /opt/selenium/secrets/server.jks +- name: SE_JAVA_OPTS + default: '' +- name: SE_JAVA_SSL_TRUST_STORE_PASSWORD + default: /opt/selenium/secrets/server.pass +- name: SE_JAVA_DISABLE_HOSTNAME_VERIFICATION + default: 'true' +- name: SE_HTTPS_CERTIFICATE + default: /opt/selenium/secrets/tls.crt +- name: SE_HTTPS_PRIVATE_KEY + default: /opt/selenium/secrets/tls.key +- name: SE_ENABLE_TRACING + default: 'true' +- name: SE_OTEL_EXPORTER_ENDPOINT + default: '' +- name: SE_OTEL_SERVICE_NAME + default: selenium-router +- name: SE_OTEL_JVM_ARGS + default: '' +- name: SE_OTEL_TRACES_EXPORTER + default: otlp +- name: SE_OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED + default: 'true' +- name: SE_JAVA_HTTPCLIENT_VERSION + default: HTTP_1_1 +- name: SE_JAVA_OPTS_DEFAULT + default: -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/selenium/logs +- name: SE_JAVA_HEAP_DUMP + default: 'false' +- name: SE_BIND_HOST + default: 'false' +- name: SE_SCREEN_DEPTH + default: '24' +- name: SE_SCREEN_DPI + default: '96' +- name: SE_START_XVFB + default: 'true' +- name: SE_START_VNC + default: 'true' +- name: SE_START_NO_VNC + default: 'true' +- name: SE_VNC_ULIMIT + default: '' +- name: SE_NO_VNC_PORT + default: '7900' +- name: SE_VNC_PORT + default: '5900' +- name: SE_VNC_NO_PASSWORD + default: '' +- name: SE_VNC_VIEW_ONLY + default: '' +- name: SE_VNC_PASSWORD + default: '' +- name: SE_EVENT_BUS_PUBLISH_PORT + default: '' +- name: SE_EVENT_BUS_SUBSCRIBE_PORT + default: '' +- name: SE_NODE_SESSION_TIMEOUT + default: '300' +- name: SE_NODE_ENABLE_MANAGED_DOWNLOADS + default: '' +- name: SE_NODE_ENABLE_CDP + default: '' +- name: SE_NODE_REGISTER_PERIOD + default: '' +- name: SE_NODE_REGISTER_CYCLE + default: '' +- name: SE_NODE_HEARTBEAT_PERIOD + default: '30' +- name: SE_REGISTRATION_SECRET + default: '' +- name: SE_BROWSER_LEFTOVERS_PROCESSES_SECS + default: '7200' +- name: SE_BROWSER_LEFTOVERS_TEMPFILES_DAYS + default: '1' +- name: SE_BROWSER_LEFTOVERS_INTERVAL_SECS + default: '3600' +- name: SE_DISABLE_UI + default: '' +- name: SE_REJECT_UNSUPPORTED_CAPS + default: 'false' +- name: SE_NEW_SESSION_THREAD_POOL_SIZE + default: '' +- name: SE_SESSION_REQUEST_TIMEOUT + default: '300' +- name: SE_SESSION_RETRY_INTERVAL + default: '5' +- name: SE_HEALTHCHECK_INTERVAL + default: '120' +- name: SE_RELAX_CHECKS + default: 'true' +- name: SE_SESSION_QUEUE_HOST + default: '' +- name: SE_SESSION_QUEUE_PORT + default: '' +- name: SE_VIDEO_FOLDER + default: '' +- name: SE_LOG_LISTEN_GRAPHQL + default: '' +- name: SE_NODE_PRESTOP_WAIT_STRATEGY + default: '' +- name: SE_SESSIONS_HOST + default: '' +- name: SE_SESSIONS_PORT + default: '' +- name: SE_SESSIONS_MAP_EXTERNAL_DATASTORE + default: 'false' +- name: SE_SESSIONS_MAP_HOST + default: '' +- name: SE_SESSIONS_MAP_PORT + default: '' +- name: SE_DISTRIBUTOR_HOST + default: '' +- name: SE_DISTRIBUTOR_PORT + default: '' +- name: SE_GRID_URL + default: '' +- name: SE_NODE_DOCKER_CONFIG_FILENAME + default: '' +- name: SE_NODE_GRACEFUL_SHUTDOWN + default: '' +- name: SE_VIDEO_CONTAINER_NAME + default: '' +- name: SE_RECORD_VIDEO + default: 'true' +- name: SE_ENABLE_BROWSER_LEFTOVERS_CLEANUP + default: 'false' +- name: SE_NODE_MAX_SESSIONS + default: '1' +- name: SE_NODE_OVERRIDE_MAX_SESSIONS + default: 'false' +- name: SE_OFFLINE + default: 'true' +- name: SE_NODE_BROWSER_VERSION + default: stable +- name: SE_NODE_PLATFORM_NAME + default: Linux +- name: SE_SUPERVISORD_LOG_LEVEL + default: info +- name: SE_SUPERVISORD_CHILD_LOG_DIR + default: /tmp +- name: SE_SUPERVISORD_LOG_FILE + default: /tmp/supervisord.log +- name: SE_SUPERVISORD_AUTO_RESTART + default: 'true' +- name: SE_SUPERVISORD_START_RETRIES + default: '5' diff --git a/tests/charts/bootstrap.sh b/tests/charts/bootstrap.sh index 653342bf28..b1d306d286 100755 --- a/tests/charts/bootstrap.sh +++ b/tests/charts/bootstrap.sh @@ -8,8 +8,7 @@ if [ "${CI:-false}" = "false" ]; then source docker-selenium-tests/bin/activate fi -python3 -m pip install pyyaml==6.0.1 \ - | grep -v 'Requirement already satisfied' +python3 -m pip install -r requirements.txt | grep -v 'Requirement already satisfied' cd .. diff --git a/tests/requirements.txt b/tests/requirements.txt index 776f649686..2e9119d06c 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -3,5 +3,6 @@ requests chardet csv2md selenium +pyyaml yamale yamllint