Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

task(ci-debugging): Create wrapper for selenium-node-chrome to manipulate config #580

Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions selenium-wrappers/selenium-node-chrome/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM selenium/node-chrome:4.0.0-beta-1-prerelease-20201202

USER 1200

# Copying configuration script generator
COPY generate_config /opt/bin/generate_config

# Generating a default config during build time
RUN /opt/bin/generate_config


EXPOSE 5900
53 changes: 53 additions & 0 deletions selenium-wrappers/selenium-node-chrome/generate_config
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/bin/bash

echo "[events]
publish = \"tcp://${SE_EVENT_BUS_HOST}:${SE_EVENT_BUS_PUBLISH_PORT}\"
subscribe = \"tcp://${SE_EVENT_BUS_HOST}:${SE_EVENT_BUS_SUBSCRIBE_PORT}\"
" > /opt/selenium/config.toml

if [[ -z "${SE_NODE_HOST}" ]] || [[ -z "${SE_NODE_PORT}" ]]; then
echo "Configuring server..."
else
echo "[server]" >> /opt/selenium/config.toml
fi

if [[ -z "${SE_NODE_HOST}" ]]; then
echo "Setting up SE_NODE_HOST..."
else
echo "hostname = \"${SE_NODE_HOST}\"" >> /opt/selenium/config.toml
fi

if [[ -z "${SE_NODE_PORT}" ]]; then
echo "Setting up SE_NODE_PORT..."
else
echo "port = \"${SE_NODE_PORT}\"" >> /opt/selenium/config.toml
fi

echo "[node]
max-concurrent-sessions = ${SE_NODE_MAX_CONCURRENT_SESSIONS}
" >> /opt/selenium/config.toml

echo "[logging]
# Configure logging
# Type: boolean
enable = true

# Log encoding
# Type: string
log-encoding = UTF-8

# File to write out logs
# Type: string
log-file = true

# Use plain log lines
# Type: boolean
plain-logs = true

# Use structured logs
# Type: boolean
structured-logs = false

# Enable trace collection
# Type: boolean
tracing = true" >> /opt/selenium/config.toml