Skip to content
This repository was archived by the owner on Jun 30, 2021. It is now read-only.

Commit 4452367

Browse files
committed
Guard transfer-logs.sh when -e CHROME=false
1 parent e5f198e commit 4452367

17 files changed

+62
-70
lines changed

CHANGELOG.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,35 @@ Note image ids also change after scm-source.json has being updated which trigger
77
###### To get container versions
88
docker exec grid versions
99

10+
## TBD_DOCKER_TAG
11+
+ **Changes:** https://github.com/elgalu/docker-selenium/compare/e5f198e1486630c19283d...master (TBD_DATE)
12+
+ Guard transfer-logs.sh when -e CHROME=false
13+
+ Chore: Tests minor cleanups
14+
+ Chore: Add /logo.png so some apps can grab it
15+
+ **Image tag details:**
16+
+ Selenium 2: TBD_SELENIUM_2_VERSION (TBD_SELENIUM_2_REVISION)
17+
+ Selenium 3: TBD_SELENIUM_3_VERSION (TBD_SELENIUM_3_REVISION)
18+
+ Chrome stable: TBD_CHROME_STABLE
19+
+ Firefox for Selenium 2: TBD_FIREFOX_FOR_SEL2
20+
+ Firefox for Selenium 3: TBD_FIREFOX_FOR_SEL3
21+
+ Geckodriver: TBD_GECKO_DRIVER
22+
+ Chromedriver: TBD_CHROME_DRIVER (TBD_CHROMEDRIVER_COMMIT)
23+
+ Java: TBD_JAVA_VENDOR Java TBD_JAVA_BUILD
24+
+ Timezone: TBD_TIME_ZONE
25+
+ FROM ubuntu:UBUNTU_FLAVOR-UBUNTU_DATE
26+
+ Python: TBD_PYTHON_VERSION
27+
+ Tested on kernel dev host: 4.4.0-72-generic x86_64
28+
+ Tested on kernel CI host: TBD_HOST_UNAME
29+
+ Built at dev host with: Docker version 17.03.1-ce, build c6d412e
30+
+ Built at CI host with: Docker version TBD_DOCKER_VERS, build TBD_DOCKER_BUILD
31+
+ Built at dev host with: Docker Compose version 1.11.2, build dfed245
32+
+ Built at CI host with: Docker Compose version TBD_DOCKER_COMPOSE_VERS, build TBD_DOCKER_COMPOSE_BUILD
33+
+ Image size: TBD_IMAGE_SIZE
34+
+ Digest: TBD_DIGEST
35+
+ Image ID: TBD_IMAGE_ID
36+
1037
## 3.3.1-p4
11-
+ **Changes:** https://github.com/elgalu/docker-selenium/compare/4af973351e7d418b67e3...master (2017-04-20)
38+
+ **Changes:** https://github.com/elgalu/docker-selenium/compare/4af973351e7d418b67e3...e5f198e1486630c19283d (2017-04-20)
1239
+ Upgrade Chrome major from 57 to 58.0.3029.81
1340
+ Add node capability: tz=Europe/Berlin / custom value
1441
+ Breaking change! New default: USE_SELENIUM="3"

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ For pull requests or local commits:
1212

1313
For repository owners only:
1414

15-
git commit -m "Breaking change! New default: USE_SELENIUM=3"
15+
git commit -m "Guard transfer-logs.sh when -e CHROME=false"
1616
git tag -d latest; git tag -d `cat VERSION`; git push origin :`cat VERSION`; git tag `cat VERSION` && git push --force origin tmp-`cat VERSION` && git push --tags
1717

1818
-- Wait for Travis to pass OK

Dockerfile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -321,17 +321,17 @@ RUN SHA="23925d017f8eccafb1be57c509a07df75490c83d" \
321321
#================
322322
# Font libraries
323323
#================
324-
# libfontconfig 0.400 MB
325-
# libfreetype6 0.400 MB
326-
# xfonts-cyrillic 2.271 MB
327-
# xfonts-scalable 2.318 MB
328-
# fonts-liberation 3.343 MB
329-
# ttf-ubuntu-font-family 4.742 MB
324+
# libfontconfig ~1 MB
325+
# libfreetype6 ~1 MB
326+
# xfonts-cyrillic ~2 MB
327+
# xfonts-scalable ~2 MB
328+
# fonts-liberation ~3 MB
329+
# ttf-ubuntu-font-family ~5 MB
330330
# Ubuntu Font Family, sans-serif typeface hinted for clarity
331331
# Removed packages:
332-
# fonts-ipafont-gothic 13.09 MB
333-
# xfonts-100dpi 5.939 MB
334-
# xfonts-75dpi 5.509 MB
332+
# fonts-ipafont-gothic ~13 MB
333+
# xfonts-100dpi ~6 MB
334+
# xfonts-75dpi ~6 MB
335335
# Regarding fonts-liberation see:
336336
# https://github.com/SeleniumHQ/docker-selenium/issues/383#issuecomment-278367069
337337
# Layer size: small: 6.898 MB (with --no-install-recommends)

README.md

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
* firefox stable [last 18 versions can be found here][2.47.1m]
1616
* fluxbox (openbox window manager can still be found [here](https://github.com/elgalu/docker-selenium/releases/tag/3.0.1c))
1717

18-
Selenium 2 `docker run ... -e USE_SELENIUM=2 elgalu/selenium:2`
19-
![docker-selenium-grid](./images/grid2_console.png)
20-
2118
Selenium 3 `docker run ... -e USE_SELENIUM=3 elgalu/selenium:latest`
2219
![docker-selenium-grid](./images/grid3_console.png)
2320

21+
Selenium 2 `docker run ... -e USE_SELENIUM=2 elgalu/selenium:2` *no longer maintained*
22+
![docker-selenium-grid](./images/grid2_console.png)
23+
2424
### Purpose
2525
The purpose of this project is to have [Selenium][] running as simple and as fast as possible.
2626

@@ -98,27 +98,6 @@ Shutdown immediately, no mercy
9898

9999
docker rm -vf grid
100100

101-
### Selenium 3
102-
Is now possible to choose Selenium 2 or Selenium 3 via docker run `-e USE_SELENIUM=2` (default) or `-e USE_SELENIUM=3`
103-
Be ready for seeing your tests failing in Firefox.
104-
Please google those errors first before opening an issue in this project.
105-
106-
### e.g. Selenium 2 with FF 47.0.1
107-
```sh
108-
# capabilities['marionette'] = False
109-
docker run --rm -ti --name=grid2 -p 4444:24444 -p 5900:25900 \
110-
-e USE_SELENIUM=2 \
111-
--shm-size=1g elgalu/selenium
112-
```
113-
114-
### e.g. Selenium 3 with FF 49.0.1
115-
```sh
116-
# capabilities['marionette'] = True
117-
docker run --rm -ti --name=grid3 -p 4444:24444 -p 5900:25900 \
118-
-e USE_SELENIUM=3 \
119-
--shm-size=1g elgalu/selenium
120-
```
121-
122101
### Docker Compose
123102
See [docker-compose](./docs/docker-compose.md)
124103

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.3.1-p4
1+
3.3.1-p5

bin/entry.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,10 @@ echo "${SELENIUM_JAR_PATH}" > SELENIUM_JAR_PATH
546546
echo "${LOGS_DIR}" > LOGS_DIR
547547
echo "${FIREFOX_VERSION}" > FIREFOX_VERSION
548548
echo "${CHROME_VESION}" > CHROME_VESION
549+
echo "${CHROME}" > CHROME
550+
echo "${FIREFOX}" > FIREFOX
551+
echo "${RC_CHROME}" > RC_CHROME
552+
echo "${RC_FIREFOX}" > RC_FIREFOX
549553
env > env
550554

551555
#------

logo.png

4.01 KB
Loading
Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
#!/usr/bin/env bash
22

3-
# Try to retrieve Chrome Browser console logs when using this image through Zalenium
4-
cp /home/seluser/chrome-user-data-dir/chrome_debug.log /var/log/cont/chrome_browser.log
3+
if [ -z "${CHROME}" ]; then
4+
if [ -f CHROME ]; then
5+
export CHROME="$(cat CHROME)"
6+
else
7+
# fallback guard
8+
export CHROME="true"
9+
fi
10+
fi
11+
12+
if [ "${CHROME}" == "true" ]; then
13+
# Try to retrieve Chrome Browser console logs when using this image through Zalenium
14+
cp /home/seluser/chrome-user-data-dir/chrome_debug.log /var/log/cont/chrome_browser.log
15+
fi

test/before_install_build

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
# set -x: print each command right before it is executed
55
set -xe
66

7-
[ "${TRAVIS_OS_NAME}" = "osx" ] && eval "$(docker-machine env default)" || true
8-
97
docker --version
108
docker-compose --version
119

test/python_test.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
help='in which browser to test')
1919
args = parser.parse_args()
2020

21-
# Selenium 2 or 3?
22-
current_selenium = os.environ.get('USE_SELENIUM', '2')
21+
current_selenium = os.environ.get('USE_SELENIUM', '3')
2322

2423
# http://selenium-python.readthedocs.org/en/latest/api.html
2524
if args.browser == 'chrome':
@@ -31,13 +30,6 @@
3130
caps = opts.to_capabilities()
3231
elif args.browser == 'firefox':
3332
caps = DesiredCapabilities.FIREFOX
34-
# if current_selenium == '3':
35-
# BREAKING CHANGE!
36-
# With selenium 3 & Firfox >= 48 you need to set marionette=true
37-
# when still using selenium 2 driver bindings (in selenium 3 is transparent)
38-
# UPDATE! no longer needed since selenium 3.0.1 is now the stable version:
39-
# https://pypi.python.org/pypi/selenium
40-
# caps['marionette'] = True
4133
else:
4234
raise ValueError("Invalid browser '%s'" % args.browser)
4335

0 commit comments

Comments
 (0)