-
Notifications
You must be signed in to change notification settings - Fork 312
/
Copy pathdocker-selenium.yaml
715 lines (690 loc) · 25.6 KB
/
docker-selenium.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
package:
name: docker-selenium
# Officially they distribute the version with the following format: 4.16.1-20231219
# But the '-' is not a valid character according to APK versioning spec; and resulting
# 'package format error' when trying to install the package. The workaround is
# to replace '-' with '.', then mangling the version to replace back.
version: "4.29.0.20250303"
epoch: 1
description: Provides a simple way to run Selenium Grid with Chrome, Firefox, and Edge using Docker, making it easier to perform browser automation
copyright:
- license: Apache-2.0
target-architecture:
# TODO: Enable aarch64
# Requires aarch64 variant of Chromedriver
- x86_64
dependencies:
runtime:
- bash
- busybox
- coreutils
- gettext
vars:
java-version: '21'
# Pin Selenium runtime dependencies to the same release as Selenium
# This is intentional as we should not ship newer Docker Selenium
# with an older Selenium release. Please update Selenium first
var-transforms:
- from: ${{package.version}}
match: ^(\d+\.\d+.\d+)\.\d+$
replace: "$1"
to: selenium-version
- from: ${{package.version}}
match: ^(.+)\.(\d+)$
replace: $1-$2
to: mangled-package-version
environment:
contents:
packages:
- acl
- bash
- build-base
- busybox
- bzip2
- ca-certificates-bundle
- curl
- git
- gnupg
- jq
- openjdk-${{vars.java-version}}-default-jdk
- openssl
- x11vnc
- yq
environment:
TC: UTC
SEL_USER: seluser
SEL_PASSWD: secret
pipeline:
- uses: git-checkout
with:
repository: https://github.com/SeleniumHQ/docker-selenium
tag: ${{vars.mangled-package-version}}
expected-commit: cbf8703009990f5757e7ebe65ae6bde2b2d55c59
- uses: patch
with:
patches: 0001-fix-paths.patch
subpackages:
- name: ${{package.name}}-base
dependencies:
runtime:
- bash
- busybox
- coreutils
- selenium-server-compat~${{vars.selenium-version}}
- sudo-rs
- supervisor
- tzdata
- ${{package.name}}-supervisor-config
- selenium-server~${{vars.selenium-version}}
- pulseaudio-utils
- pulseaudio
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}/usr/bin
mkdir -p ${{targets.contextdir}}/etc/supervisor/conf.d
mkdir -p ${{targets.contextdir}}/var/tmp
mkdir -p ${{targets.contextdir}}/opt/bin
- runs: |
cp ./charts/selenium-grid/configs/node/nodeGridUrl.sh ${{targets.contextdir}}/opt/bin
cp ./charts/selenium-grid/configs/node/nodePreStop.sh ${{targets.contextdir}}/opt/bin
# https://github.com/SeleniumHQ/docker-selenium/blob/trunk/Base/Dockerfile
- working-directory: Base
pipeline:
- runs: |
cp check-grid.sh ${{targets.contextdir}}/opt/bin/
cp entry_point.sh ${{targets.contextdir}}/opt/bin/
cp supervisord.conf ${{targets.contextdir}}/etc
mkdir -p ${{targets.contextdir}}/var/run/supervisor
- runs: |
mkdir -p ${{targets.contextdir}}/opt/selenium
echo "${SEL_PASSWD}" > ${{targets.contextdir}}/opt/selenium/initialPasswd
# TODO: Implement malware scan for jars retrieved by coursier
- runs: |
# Retrieve OpenTelemetry/GRPC/Netty Java versions
# Do not change these. Docker Selenium is sensitive to the versions used
OPENTELEMETRY_VERSION=$(cat ./Dockerfile | grep "^ARG OPENTELEMETRY_VERSION" | sed "s/.*=//")
GRPC_VERSION=$(cat ./Dockerfile | grep "^ARG GRPC_VERSION" | sed "s/.*=//")
NETTY_VERSION=$(cat ./Dockerfile | grep "^ARG NETTY_VERSION" | sed "s/.*=//")
mkdir -p ${{targets.contextdir}}/external_jars
curl -sSLfO https://github.com/coursier/launchers/raw/master/coursier
chmod +x coursier
./coursier fetch --classpath --cache ${{targets.contextdir}}/external_jars \
io.opentelemetry:opentelemetry-exporter-otlp:${OPENTELEMETRY_VERSION} \
io.netty:netty-codec-http:${NETTY_VERSION} \
io.grpc:grpc-netty:${GRPC_VERSION} > ${{targets.contextdir}}/external_jars/.classpath.txt
chmod 665 ${{targets.contextdir}}/external_jars/.classpath.txt
sed -i 's|${{targets.contextdir}}||g' ${{targets.contextdir}}/external_jars/.classpath.txt
test:
environment:
environment:
SE_SUPERVISORD_LOG_FILE: "/tmp/supervisord.log"
SE_SUPERVISORD_CHILD_LOG_DIR: "/tmp"
SE_SUPERVISORD_PID_FILE: "/tmp/supervisord.pid"
SE_SUPERVISORD_LOG_LEVEL: "info"
SEL_USER: seluser
pipeline:
- name: "Check selenium base status"
uses: test/daemon-check-output
with:
start: "/opt/bin/entry_point.sh"
timeout: 60
expected_output: |
supervisord started
- name: ${{package.name}}-config
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}/opt/selenium/
install -m644 "./example-config.toml" ${{targets.contextdir}}/opt/selenium/config.toml
- name: ${{package.name}}-supervisor-config
description: Docker Selenium supervisor configuration
dependencies:
replaces:
- supervisor-config
provides:
- supervisor-config
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}/etc
cd ./Base
install supervisord.conf ${{targets.contextdir}}/etc
mv ${{targets.contextdir}}/etc/supervisord.conf ${{targets.contextdir}}/etc
# Unset setuid bit
# jason@ copied this directly from https://serverfault.com/a/238964
# The extra 0 is to unset the setuid bit apparently.
chmod 0775 ${{targets.contextdir}}/etc/supervisord.conf
- name: ${{package.name}}-standalone
dependencies:
runtime:
- selenium-server-standalone~${{vars.selenium-version}}
- ${{package.name}}-base
- ${{package.name}}-config
pipeline:
- working-directory: Standalone
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}/etc/supervisor/conf.d
mkdir -p ${{targets.contextdir}}/opt/bin
install -Dm755 start-selenium-standalone.sh ${{targets.contextdir}}/opt/bin/
install -Dm755 selenium.conf ${{targets.contextdir}}/etc/supervisor/conf.d/
install -Dm755 generate_config ${{targets.contextdir}}/opt/bin/
test:
environment:
contents:
packages:
- chromium
- chromium-docker-selenium-compat
- ${{package.name}}-node-base
environment:
SE_SESSION_REQUEST_TIMEOUT: 300
SE_SESSION_RETRY_INTERVAL: 15
SE_HEALTHCHECK_INTERVAL: 120
SE_RELAX_CHECKS: true
SE_REJECT_UNSUPPORTED_CAPS: true
SE_OTEL_SERVICE_NAME: "selenium-standalone"
SE_NODE_SESSION_TIMEOUT: 150
SE_NODE_OVERRIDE_MAX_SESSIONS: 10
DRAIN_AFTER_SESSION_COUNT: 10
SE_DRAIN_AFTER_SESSION_COUNT: 4
SE_NODE_MAX_SESSIONS: 10
SE_NODE_BROWSER_NAME: chrome
SE_NODE_BROWSER_VERSION: test
SE_BROWSER_BINARY_LOCATION: '"binary": "/usr/bin/chromium-browser"'
SE_BIND_HOST: false
CONFIG_FILE: /opt/selenium/config.toml
pipeline:
- name: "Check selenium standalone status"
uses: test/daemon-check-output
with:
start: "/opt/bin/start-selenium-standalone.sh"
timeout: 60
expected_output: |
Started Selenium Standalone
# selenium-hub does not handle rendering or direct interaction with browsers
# we can skip adding chromium, Xvfb, fluxbox, and related font packages.
- name: ${{package.name}}-hub
description: Docker Selenium Hub
dependencies:
runtime:
- ${{package.name}}-base
- ${{package.name}}-config
- selenium-server~${{vars.selenium-version}}
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}/opt/bin
mkdir -p ${{targets.contextdir}}/opt/selenium
# https://github.com/SeleniumHQ/docker-selenium/blob/trunk/Hub/Dockerfile
- working-directory: Hub
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}/etc/supervisor/conf.d
install -Dm755 selenium-grid-hub.conf ${{targets.contextdir}}/etc/supervisor/conf.d/
install -Dm755 start-selenium-grid-hub.sh ${{targets.contextdir}}/opt/bin/
test:
environment:
environment:
SE_RELAX_CHECKS: True
SE_BIND_HOST: False
SE_SESSION_RETRY_INTERVAL: 50
SE_HEALTHCHECK_INTERVAL: 500
SE_SESSION_REQUEST_TIMEOUT: 500
pipeline:
- name: "Check selenium hub status"
uses: test/daemon-check-output
with:
start: "/opt/bin/start-selenium-grid-hub.sh"
timeout: 60
expected_output: |
Started Selenium Hub
- name: ${{package.name}}-node-base
description: Node base
dependencies:
runtime:
- Xvfb
- fluxbox
- font-ipa
- font-liberation
- font-misc-cyrillic
- font-noto-emoji
- font-ubuntu
- font-wqy-zenhei
- fontconfig
- freetype
- glib
- glibc-locale-en
- gettext
- libfontconfig1
- libgcc
- libnss
- libnss-tools
- libxcb
- mcookie
- novnc
- pulseaudio
- pulseaudio-utils
- ttf-dejavu
- websockify
- x11vnc
- xauth
- xkbcomp
- xkeyboard-config
- xmessage
- xvfb-run
- ${{package.name}}-base
- ${{package.name}}-config
- selenium-server~${{vars.selenium-version}}
pipeline:
- working-directory: NodeBase
pipeline:
# https://github.com/SeleniumHQ/docker-selenium/blob/trunk/NodeBase/Dockerfile
- runs: |
mkdir -p ${{targets.contextdir}}/opt/bin
mkdir -p ${{targets.contextdir}}/etc/supervisor/conf.d
mkdir -p ${{targets.contextdir}}/usr/share/images/fluxbox
mkdir -p ${{targets.contextdir}}/home/$SEL_USER/.fluxbox
mkdir -p ${{targets.contextdir}}/tmp/.X11-unix
mkdir -p ${{targets.contextdir}}/home/$SEL_USER/.vnc
mkdir -p ${{targets.contextdir}}/opt/selenium
- runs: |
install -Dm755 start-selenium-node.sh ${{targets.contextdir}}/opt/bin/
install -Dm755 start-xvfb.sh ${{targets.contextdir}}/opt/bin/
install -Dm755 selenium.conf ${{targets.contextdir}}/etc/supervisor/conf.d/
install -Dm755 start-vnc.sh ${{targets.contextdir}}/opt/bin/
install -Dm755 start-novnc.sh ${{targets.contextdir}}/opt/bin/
install -Dm755 selenium_grid_logo.png ${{targets.contextdir}}/usr/share/images/fluxbox/ubuntu-light.png
install -Dm755 generate_config ${{targets.contextdir}}/opt/bin/
install -Dm755 generate_relay_config ${{targets.contextdir}}/opt/bin/
echo "${SEL_PASSWD}" | x11vnc -storepasswd - ${{targets.contextdir}}/home/$SEL_USER/.vnc/passwd
test:
environment:
contents:
packages:
- geckodriver
environment:
SE_EVENT_BUS_PUBLISH_PORT: 4442
SE_EVENT_BUS_SUBSCRIBE_PORT: 4443
SE_EVENT_BUS_HOST: selenium-hub
CONFIG_FILE: /opt/selenium/config.toml
SE_BIND_HOST: true
pipeline:
- name: "Check selenium node-base status"
uses: test/daemon-check-output
with:
start: "/opt/bin/start-selenium-node.sh"
timeout: 60
expected_output: |
Started Selenium node
# https://github.com/SeleniumHQ/docker-selenium/blob/trunk/node-chromium/Dockerfile
- name: ${{package.name}}-node-chromium
description: NodeChromium
dependencies:
runtime:
- ${{package.name}}-node-base
- chromium-docker-selenium-compat
- chromium
pipeline:
- working-directory: NodeChromium
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}/opt/bin/
mkdir -p ${{targets.contextdir}}/opt/selenium/
mkdir -p ${{targets.contextdir}}/etc/supervisor/conf.d/
install -Dm755 wrap_chromium_binary ${{targets.contextdir}}/opt/bin/
install -Dm755 chrome-cleanup.sh ${{targets.contextdir}}/opt/bin/
install -Dm755 chrome-cleanup.conf ${{targets.contextdir}}/etc/supervisor/conf.d/
test:
environment:
environment:
SE_EVENT_BUS_PUBLISH_PORT: 4442
SE_EVENT_BUS_SUBSCRIBE_PORT: 4443
SE_EVENT_BUS_HOST: selenium-hub
CONFIG_FILE: /opt/selenium/config.toml
SE_BIND_HOST: true
pipeline:
- name: "Check selenium node-chromium status"
uses: test/daemon-check-output
with:
start: "/opt/bin/start-selenium-node.sh"
timeout: 60
expected_output: |
Adding Chrome for
Started Selenium node
- name: ${{package.name}}-node-firefox
dependencies:
runtime:
- ${{package.name}}-node-base
- geckodriver
- firefox
pipeline:
- working-directory: NodeFirefox
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}/opt/bin
mkdir -p ${{targets.contextdir}}/opt/selenium/
mkdir -p ${{targets.contextdir}}/etc/supervisor/conf.d/
install -Dm755 firefox-cleanup.sh ${{targets.contextdir}}/opt/bin/firefox-cleanup.sh
install -Dm755 firefox-cleanup.conf ${{targets.contextdir}}/etc/supervisor/conf.d/firefox-cleanup.conf
echo "firefox" > ${{targets.contextdir}}/opt/selenium/browser_name
firefox --version | awk '{print $3}' > ${{targets.contextdir}}/opt/selenium/browser_version
echo "\"moz:firefoxOptions\": {\"binary\": \"/usr/bin/firefox\"}" > ${{targets.contextdir}}/opt/selenium/browser_binary_location
test:
environment:
environment:
SE_EVENT_BUS_PUBLISH_PORT: 4442
SE_EVENT_BUS_SUBSCRIBE_PORT: 4443
SE_EVENT_BUS_HOST: selenium-hub
CONFIG_FILE: /opt/selenium/config.toml
SE_BIND_HOST: true
pipeline:
- runs: |
firefox --version
- name: "Check selenium node-firefox status"
uses: test/daemon-check-output
with:
start: "/opt/bin/start-selenium-node.sh"
timeout: 60
expected_output: |
Adding Firefox for
Started Selenium node
- name: ${{package.name}}-standalone-chromium
description: Docker Selenium standalone
dependencies:
runtime:
- ${{package.name}}-node-chromium
- ${{package.name}}-standalone
test:
environment:
environment:
SE_EVENT_BUS_PUBLISH_PORT: 4442
SE_EVENT_BUS_SUBSCRIBE_PORT: 4443
SE_EVENT_BUS_HOST: selenium-hub
CONFIG_FILE: /opt/selenium/config.toml
SE_BIND_HOST: true
pipeline:
- name: "Check selenium standalone-chromium status"
uses: test/daemon-check-output
with:
start: "/opt/bin/start-selenium-node.sh"
timeout: 60
expected_output: |
Starting Selenium Grid Node
- name: ${{package.name}}-event-bus
description: Docker Selenium event-bus
dependencies:
runtime:
- ${{package.name}}-base
pipeline:
- working-directory: EventBus
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}/etc/supervisor/conf.d
mkdir -p ${{targets.contextdir}}/opt/bin
install -Dm755 selenium-grid-eventbus.conf ${{targets.contextdir}}/etc/supervisor/conf.d/
install -Dm755 start-selenium-grid-eventbus.sh ${{targets.contextdir}}/opt/bin/
test:
environment:
environment:
SE_DISTRIBUTOR_PORT: 5553
SE_BIND_HOST: False
pipeline:
- name: "Check selenium eventbus status"
uses: test/daemon-check-output
with:
start: "/opt/bin/start-selenium-grid-eventbus.sh"
timeout: 60
expected_output: |
Started Selenium EventBus
- name: ${{package.name}}-distributor
description: Docker Selenium distributor
dependencies:
runtime:
- ${{package.name}}-base
- selenium-server~${{vars.selenium-version}}
pipeline:
- working-directory: Distributor
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}/etc/supervisor/conf.d
mkdir -p ${{targets.contextdir}}/opt/bin
install -Dm755 selenium-grid-distributor.conf ${{targets.contextdir}}/etc/supervisor/conf.d/
install -Dm755 start-selenium-grid-distributor.sh ${{targets.contextdir}}/opt/bin/
test:
environment:
environment:
SE_SESSION_REQUEST_TIMEOUT: 300
SE_SESSION_RETRY_INTERVAL: 15
SE_HEALTHCHECK_INTERVAL: 120
SE_BIND_HOST: true
SE_EVENT_BUS_HOST: "127.0.0.1"
SE_EVENT_BUS_PUBLISH_PORT: 4442
SE_EVENT_BUS_SUBSCRIBE_PORT: 4443
SE_SESSIONS_MAP_HOST: "127.0.0.1"
SE_SESSIONS_MAP_PORT: 5556
SE_SESSION_QUEUE_HOST: "127.0.0.1"
SE_SESSION_QUEUE_PORT: 5559
SE_DISTRIBUTOR_HOST: "127.0.0.1"
SE_DISTRIBUTOR_PORT: 5553
pipeline:
- name: "Check selenium distributor status"
uses: test/daemon-check-output
with:
start: "/opt/bin/start-selenium-grid-distributor.sh"
timeout: 60
expected_output: |
Started Selenium Distributor
- name: ${{package.name}}-node-docker
description: Docker Selenium node docker
dependencies:
runtime:
- ${{package.name}}-base
- ${{package.name}}-config
- socat
pipeline:
- working-directory: NodeDocker
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}/etc/supervisor/conf.d
mkdir -p ${{targets.contextdir}}/opt/bin
install -Dm755 selenium-grid-docker.conf ${{targets.contextdir}}/etc/supervisor/conf.d/
install -Dm755 start-selenium-grid-docker.sh ${{targets.contextdir}}/opt/bin/
install -Dm755 start-socat.sh ${{targets.contextdir}}/opt/bin/
test:
environment:
environment:
SE_DISTRIBUTOR_PORT: 5553
SE_BIND_HOST: false
SE_NODE_GRID_URL: http://127.0.0.1:4444
SE_EVENT_BUS_HOST: 127.0.0.1
SE_EVENT_BUS_PUBLISH_PORT: 4442
SE_EVENT_BUS_SUBSCRIBE_PORT: 4443
SE_ROUTER_PORT: 4444
SE_ROUTER_HOST: selenium-hub
SE_SESSION_RETRY_INTERVAL: 15
SE_SESSION_REQUEST_TIMEOUT: 300
SE_SESSIONS_MAP_HOST: "127.0.0.1"
SE_SESSION_QUEUE_PORT: 5559
CONFIG_FILE: /opt/selenium/config.toml
pipeline:
- name: "Check selenium nodedocker status"
uses: test/daemon-check-output
with:
start: "/opt/bin/start-selenium-grid-docker.sh"
timeout: 60
expected_output: |
Started Selenium node
- name: ${{package.name}}-router
description: Docker Selenium router
dependencies:
runtime:
- ${{package.name}}-base
- ${{package.name}}-config
- selenium-server~${{vars.selenium-version}}
pipeline:
- working-directory: Router
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}/etc/supervisor/conf.d
mkdir -p ${{targets.contextdir}}/opt/bin
install -Dm755 selenium-grid-router.conf ${{targets.contextdir}}/etc/supervisor/conf.d/
install -Dm755 start-selenium-grid-router.sh ${{targets.contextdir}}/opt/bin/
test:
environment:
environment:
SE_DISTRIBUTOR_PORT: 5553
SE_BIND_HOST: false
SE_NODE_GRID_URL: http://127.0.0.1:4444
SE_EVENT_BUS_HOST: 127.0.0.1
SE_EVENT_BUS_PUBLISH_PORT: 4442
SE_EVENT_BUS_SUBSCRIBE_PORT: 4443
SE_SESSION_QUEUE_HOST: "127.0.0.1"
SE_DISTRIBUTOR_HOST: "127.0.0.1"
SE_SESSIONS_MAP_HOST: "127.0.0.1"
SE_SESSIONS_MAP_PORT: 5556
SE_SESSION_QUEUE_PORT: 5559
SE_SESSION_RETRY_INTERVAL: 15
SE_SESSION_REQUEST_TIMEOUT: 500
SE_HEALTHCHECK_INTERVAL: 120
pipeline:
- name: "Check selenium router status"
uses: test/daemon-check-output
with:
start: "/opt/bin/start-selenium-grid-router.sh"
timeout: 60
expected_output: |
Started Selenium Router
- name: ${{package.name}}-session-queue
description: Docker Selenium SessionQueue
dependencies:
runtime:
- ${{package.name}}-base
- selenium-server~${{vars.selenium-version}}
pipeline:
- working-directory: SessionQueue
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}/etc/supervisor/conf.d
mkdir -p ${{targets.contextdir}}/opt/bin
install -Dm755 selenium-grid-session-queue.conf ${{targets.contextdir}}/etc/supervisor/conf.d/
install -Dm755 start-selenium-grid-session-queue.sh ${{targets.contextdir}}/opt/bin/
test:
environment:
environment:
SE_SESSION_QUEUE_HOST: "127.0.0.1"
SE_SESSION_QUEUE_PORT: 5559
SE_BIND_HOST: false
SE_SESSION_RETRY_INTERVAL: 15
SE_SESSION_REQUEST_TIMEOUT: 300
pipeline:
- name: "Check selenium session-queue status"
uses: test/daemon-check-output
with:
start: "/opt/bin/start-selenium-grid-session-queue.sh"
timeout: 60
expected_output: |
Started Selenium SessionQueue
- name: ${{package.name}}-sessions
description: Docker Selenium Sessions
dependencies:
runtime:
- ${{package.name}}-base
- ${{package.name}}-config
- selenium-server~${{vars.selenium-version}}
pipeline:
- working-directory: Sessions
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}/etc/supervisor/conf.d
mkdir -p ${{targets.contextdir}}/opt/bin
install -Dm755 selenium-grid-sessions.conf ${{targets.contextdir}}/etc/supervisor/conf.d/
install -Dm755 start-selenium-grid-sessions.sh ${{targets.contextdir}}/opt/bin/
test:
environment:
environment:
SE_SESSION_QUEUE_HOST: "127.0.0.1"
SE_SESSION_QUEUE_PORT: 5559
SE_BIND_HOST: true
SE_EVENT_BUS_PUBLISH_PORT: 4442
SE_EVENT_BUS_SUBSCRIBE_PORT: 4443
SE_EVENT_BUS_HOST: 127.0.0.1
CONFIG_FILE: /opt/selenium/config.toml
pipeline:
- name: "Check selenium sessions status"
uses: test/daemon-check-output
with:
start: "/opt/bin/start-selenium-grid-sessions.sh"
timeout: 60
expected_output: |
Started Selenium SessionMap
- name: ${{package.name}}-standalone-docker
description: Docker Selenium Standalone Docker
dependencies:
runtime:
- ${{package.name}}-node-docker
- ${{package.name}}-config
pipeline:
- working-directory: StandaloneDocker
pipeline:
- runs: |
mkdir -p ${{targets.contextdir}}/opt/bin
install -Dm755 start-selenium-grid-docker.sh ${{targets.contextdir}}/opt/bin/
test:
environment:
contents:
packages:
- ${{package.name}}-config
environment:
SE_BIND_HOST: true
SE_SESSION_REQUEST_TIMEOUT: 300
SE_SESSION_RETRY_INTERVAL: 15
SE_RELAX_CHECKS: true
CONFIG_FILE: /opt/selenium/config.toml
pipeline:
- name: "Check selenium sessions status"
uses: test/daemon-check-output
with:
start: "/opt/bin/start-selenium-grid-docker.sh"
timeout: 60
expected_output: |
Started Selenium Standalone
- name: ${{package.name}}-standalone-firefox
description: Docker Selenium Standalone Firefox
dependencies:
runtime:
- ${{package.name}}-node-firefox
- ${{package.name}}-standalone
pipeline:
test:
environment:
environment:
SE_SESSION_REQUEST_TIMEOUT: 300
SE_SESSION_RETRY_INTERVAL: 15
SE_HEALTHCHECK_INTERVAL: 120
SE_RELAX_CHECKS: true
SE_REJECT_UNSUPPORTED_CAPS: true
SE_OTEL_SERVICE_NAME: "selenium-standalone"
SE_NODE_SESSION_TIMEOUT: 150
SE_NODE_OVERRIDE_MAX_SESSIONS: 10
DRAIN_AFTER_SESSION_COUNT: 10
SE_DRAIN_AFTER_SESSION_COUNT: 4
SE_NODE_MAX_SESSIONS: 10
SE_NODE_BROWSER_NAME: chrome
SE_NODE_BROWSER_VERSION: test
SE_BROWSER_BINARY_LOCATION: '"binary": "/usr/bin/chromium-browser"'
SE_BIND_HOST: false
CONFIG_FILE: /opt/selenium/config.toml
pipeline:
- name: "Check selenium standalone status"
uses: test/daemon-check-output
with:
start: "/opt/bin/start-selenium-standalone.sh"
timeout: 60
expected_output: |
Started Selenium Standalone
update:
enabled: true
ignore-regex-patterns:
- ".*grid.*"
version-transform:
- match: ^(.+)\-(\d+)$
replace: $1.$2
github:
identifier: SeleniumHQ/docker-selenium