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

Commit 4bcdfa2

Browse files
committed
geckodriver, Ubuntu 20160923, chromedriver.log, DBUS magic
1 parent 4b100fc commit 4bcdfa2

14 files changed

+145
-70
lines changed

.travis.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ matrix:
2525
# com.docker.docker Incompatible CPU detected
2626
# Docker requires a processor with virtualization capabilities
2727
- env:
28-
- DOCKER_VERSION="1.12.1-rc2"
29-
DOCKER_COMPOSE_VERSION="1.8.0"
28+
- DOCKER_VERSION="1.12.1"
29+
DOCKER_COMPOSE_VERSION="1.8.1"
3030
OPERATING_SYSTEM="osx"
3131
include:
32-
# Linux with docker:stable compose:stable/older
32+
# Linux with docker:stable compose:stable
3333
# Use DOCKER_PUSH_LATEST=false to debug
3434
- os: linux
3535
sudo: required
@@ -38,19 +38,19 @@ matrix:
3838
- docker
3939
env:
4040
- DOCKER_VERSION="stable"
41-
DOCKER_COMPOSE_VERSION="1.8.0"
41+
DOCKER_COMPOSE_VERSION="1.8.1"
4242
DOCKER_PUSH=true
4343
DOCKER_PUSH_LATEST=true
44-
# Linux with docker:beta compose:stable/older
44+
# Linux with docker:beta/older compose:beta/older
4545
- os: linux
4646
sudo: required
4747
dist: trusty
4848
services:
4949
- docker
5050
env:
51-
- DOCKER_VERSION="1.12.1-rc2"
51+
- DOCKER_VERSION="1.12.0"
5252
DOCKER_COMPOSE_VERSION="1.8.0"
53-
# Linux with docker:stable compose:beta
53+
# Linux with docker:stable compose:beta/older
5454
- os: linux
5555
sudo: required
5656
dist: trusty
@@ -59,21 +59,21 @@ matrix:
5959
env:
6060
- DOCKER_VERSION="stable"
6161
DOCKER_COMPOSE_VERSION="1.8.0"
62-
# Linux with docker:beta compose:beta
62+
# Linux with docker:beta/older compose:stable
6363
- os: linux
6464
sudo: required
6565
dist: trusty
6666
services:
6767
- docker
6868
env:
69-
- DOCKER_VERSION="1.12.1-rc2"
70-
DOCKER_COMPOSE_VERSION="1.8.0"
69+
- DOCKER_VERSION="1.12.0"
70+
DOCKER_COMPOSE_VERSION="1.8.1"
7171
# Mac OSX: only test native docker version
7272
- os: osx
7373
osx_image: xcode8
7474
env:
75-
- DOCKER_VERSION="1.12.1-rc2"
76-
DOCKER_COMPOSE_VERSION="1.8.0"
75+
- DOCKER_VERSION="1.12.1"
76+
DOCKER_COMPOSE_VERSION="1.8.1"
7777
OPERATING_SYSTEM="osx"
7878

7979
before_install:

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,34 @@ 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+
+ Date: TBD_DATE
12+
+ Set chromedriver --log-path='/var/log/cont/chromedriver.log'
13+
+ Add geckodriver for Firefox >= 48 (future releases)
14+
+ Upgrade Ubuntu xenial to 20160923
15+
+ Perhaps fixed DBUS mistery with at entry.sh
16+
+ Client side: docker-compose from 1.8.0 to 1.8.1
17+
+ Image tag details:
18+
+ Selenium: vTBD_SELENIUM_VERSION (TBD_SELENIUM_REVISION)
19+
+ Chrome stable: TBD_CHROME_STABLE
20+
+ Firefox stable: TBD_FIREFOX_STABLE
21+
+ Chromedriver: TBD_CHROME_DRIVER (TBD_CHROMEDRIVER_COMMIT)
22+
+ Java: TBD_JAVA_VENDOR Java TBD_JAVA_BUILD
23+
+ Timezone: TBD_TIME_ZONE
24+
+ FROM ubuntu:UBUNTU_FLAVOR-UBUNTU_DATE
25+
+ Python: TBD_PYTHON_VERSION
26+
+ Sauce Connect TBD_SAUCE_CONNECT_VERS, build TBD_SAUCE_CONNECT_BUILD TBD_SAUCE_CONNECT_REVISION
27+
+ BrowserStack Local version TBD_BROWSER_STACK_VERSION
28+
+ Tested on kernel dev host: 4.4.0-38-generic x86_64
29+
+ Tested on kernel CI host: TBD_HOST_UNAME
30+
+ Built at dev host with: Docker version 1.12.1, build 23cf638
31+
+ Built at CI host with: Docker version TBD_DOCKER_VERS, build TBD_DOCKER_BUILD
32+
+ Built at dev host with: Docker Compose version 1.8.1, build 878cff1
33+
+ Built at CI host with: Docker Compose version TBD_DOCKER_COMPOSE_VERS, build TBD_DOCKER_COMPOSE_BUILD
34+
+ Image size: TBD_IMAGE_SIZE
35+
+ Digest: TBD_DIGEST
36+
+ Image ID: TBD_IMAGE_ID
37+
1038
## 2.53.1x
1139
+ Date: 2016-09-15
1240
+ Upgrade Chrome stable patch 53.0.2785.116

CONTRIBUTING.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ For pull requests or local commits:
66
time (./test/bef && ./test/install && ./test/script_start && ./test/script_end) ; beep
77
docker exec grid versions && ./test/after_script && travis lint
88
open ./images/grid_console.png && open ./videos/chrome/*.mkv
9-
git checkout -b tmp-2.53.1x && git checkout ./images/grid_console.png
9+
git checkout -b tmp-2.53.1y && git checkout ./images/grid_console.png
1010
#git add ... git commit ... git push ... open pull request
1111

1212
For repository owners only:
1313

14-
git commit -m "Upgrade Chrome stable patch 53.0.2785.116"
15-
git tag -d latest && git tag 2.53.1w && git push origin tmp-2.53.1x && git push --tags
14+
git commit -m "geckodriver, Ubuntu 20160923, chromedriver.log, DBUS magic"
15+
git tag -d latest && git tag 2.53.1y && git push origin tmp-2.53.1y && git push --tags
1616

1717
-- Wait for Travis to pass OK
1818
-- Make sure changes got merged into master by elgalubot
1919

20-
git checkout master && git pull && git branch -d tmp-2.53.1x && git push origin --delete tmp-2.53.1x
20+
git checkout master && git pull && git branch -d tmp-2.53.1y && git push origin --delete tmp-2.53.1y
2121

2222
-- Re-add TBD_* section in CHANGELOG.md starting with TBD_DOCKER_TAG
2323
-- If Chrome version changed upload:
@@ -27,18 +27,17 @@ For repository owners only:
2727
### Chrome artifact
2828
Keep certain bins if chrome version changed for example:
2929

30-
cd ~/tmp_binaries && VER="53.0.2785.116"
31-
NAME="google-chrome-stable_${VER}_amd64" && echo ${NAME}
30+
cd ~/tmp_binaries && VER="53.0.2785.116" && NAME="google-chrome-stable_${VER}_amd64" && echo ${NAME}
3231
wget -nv --show-progress -O ${NAME}.deb "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb"
3332
md5sum ${NAME}.deb > ${NAME}.md5 && shasum ${NAME}.deb > ${NAME}.sha
3433
cp ${NAME}.md5 ${NAME}.sha ~/docker/binaries
3534

3635
## Retry
3736
Failed in Travis? retry
3837

39-
git tag -d 2.53.1w && git push origin :2.53.1w
38+
git tag -d 2.53.1y && git push origin :2.53.1y
4039
#git add ...
41-
git commit --amend && git tag 2.53.1w && git push --force origin tmp-2.53.1x && git push --tags
40+
git commit --amend && git tag 2.53.1y && git push --force origin tmp-2.53.1y && git push --tags
4241

4342
## Docker push from Travis CI
4443
Travis [steps](https://docs.travis-ci.com/user/docker/#Pushing-a-Docker-Image-to-a-Registry) involve `docker login` and docker credentials encryptions.

Dockerfile

Lines changed: 60 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
###################################################
44
#== Ubuntu xenial is 16.04, i.e. FROM ubuntu:16.04
55
# search for more at https://registry.hub.docker.com/_/ubuntu/tags/manage/
6-
FROM ubuntu:xenial-20160818
6+
FROM ubuntu:xenial-20160923.1
77
ENV UBUNTU_FLAVOR="xenial" \
8-
UBUNTU_DATE="20160818"
8+
UBUNTU_DATE="20160923.1"
99

1010
#== Ubuntu wily is 15.10, i.e. FROM ubuntu:15.10
1111
# FROM ubuntu:wily-20151208
@@ -47,6 +47,9 @@ RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5 \
4747
# Remove with: sudo apt-key del 3B4FE6ACC0B21F32
4848
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32 \
4949
&& apt-key update -qqy
50+
# Remove with: sudo apt-key del A2F683C52980AECF
51+
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A2F683C52980AECF \
52+
&& apt-key update -qqy
5053

5154
#========================
5255
# Miscellaneous packages
@@ -418,16 +421,6 @@ RUN apt-get -qqy update \
418421
# && npm install -g gifify \
419422
# && gifify --version
420423

421-
#==========================
422-
# Mozilla Firefox - Latest
423-
#==========================
424-
# RUN apt-get -qqy update \
425-
# && apt-get -qqy install \
426-
# firefox \
427-
# && rm -rf /var/lib/apt/lists/*
428-
# If we are not installing latest from apt sources then remove (purge) default
429-
RUN apt-get -qqy purge firefox
430-
431424
#=========================================================
432425
# Python2 for Supervisor, selenium tests, and other stuff
433426
#=========================================================
@@ -460,6 +453,7 @@ RUN apt-get -qqy update \
460453

461454
ENV CPU_ARCH 64
462455
ENV SEL_HOME ${NORMAL_USER_HOME}/selenium
456+
RUN mkdir -p ${SEL_HOME}
463457

464458
#===============================
465459
# Mozilla Firefox install tools
@@ -673,12 +667,32 @@ RUN cd /tmp \
673667
# && rm firefox-${FF_VER}.${FF_LANG}.linux64.tar.bz2 \
674668
# ;done
675669

670+
#==========================
671+
# Mozilla Firefox - Latest
672+
#==========================
673+
# RUN apt-get -qqy update \
674+
# && apt-get -qqy install \
675+
# firefox \
676+
# && rm -rf /var/lib/apt/lists/*
677+
# ENV FF_VER="latest" \
678+
# FF_LANG="en-US" \
679+
# FF_DEST="/usr/lib/firefox"
680+
# ENV FIREFOX_DEST_BIN="${FF_DEST}/firefox"
681+
# RUN ln -fs ${FIREFOX_DEST_BIN} /usr/bin/firefox
682+
676683
#-------------------------#
677684
# FIREFOX_VERSIONS Latest #
678685
#-------------------------#
679686
# Install Latest available firefox version
680687
# this also used to work: ENV FIREFOX_LATEST_VERSION latest
681688
#
689+
#--- Nightly
690+
# ENV FF_VER="52.0a0" \
691+
# FF_PLATFORM="linux-i686" \
692+
# FF_INNER_PATH="firefox/nightly/latest-mozilla-central"
693+
# ENV FF_COMP="firefox-${FF_VER}.${FF_LANG}.${FF_PLATFORM}.tar.bz2"
694+
# ENV FF_URL="${FF_BASE_URL}/${FF_INNER_PATH}/${FF_COMP}"
695+
#
682696
# Where to find latest version:
683697
# https://archive.mozilla.org/pub/mozilla.org/firefox/releases/latest/linux-x86_64/en-US/
684698
# https://download-installer.cdn.mozilla.net/pub/mozilla.org/firefox/releases/latest/linux-x86_64/en-US/
@@ -688,19 +702,42 @@ RUN cd /tmp \
688702
# FF_LANG can be either en-US // de // fr and so on
689703
# Regarding the pip packages, see released versions at:
690704
# https://github.com/mozilla/mozdownload/releases
691-
ENV FF_VER="47.0.1" \
692-
FF_LANG="en-US" \
693-
FF_PLATFORM="linux-x86_64" \
705+
706+
ENV FF_LANG="en-US" \
694707
FF_BASE_URL="https://archive.mozilla.org/pub" \
695708
FF_DEST="${SEL_HOME}/firefox"
696-
ENV FF_COMP="firefox-${FF_VER}.tar.bz2" \
697-
FIREFOX_DEST_BIN="${FF_DEST}/firefox"
698-
ENV FF_URL "${FF_BASE_URL}/firefox/releases/${FF_VER}/${FF_PLATFORM}/${FF_LANG}/${FF_COMP}"
709+
ENV FIREFOX_DEST_BIN="${FF_DEST}/firefox"
710+
711+
#--- Stable
712+
ENV FF_VER="47.0.1" \
713+
FF_PLATFORM="linux-x86_64" \
714+
FF_INNER_PATH="firefox/releases"
715+
ENV FF_COMP="firefox-${FF_VER}.tar.bz2"
716+
ENV FF_URL="${FF_BASE_URL}/${FF_INNER_PATH}/${FF_VER}/${FF_PLATFORM}/${FF_LANG}/${FF_COMP}"
717+
699718
RUN mkdir -p ${SEL_HOME} && cd ${SEL_HOME} \
700719
&& wget -nv "${FF_URL}" -O "firefox.tar.bz2" \
701720
&& bzip2 -d "firefox.tar.bz2" \
702721
&& tar xf "firefox.tar" \
703-
&& rm "firefox.tar"
722+
&& rm "firefox.tar" \
723+
&& sudo ln -fs ${FIREFOX_DEST_BIN} /usr/bin/firefox
724+
725+
#============
726+
# GeckoDriver
727+
#============
728+
ENV GECKOD_VER="0.10.0" \
729+
GECKOD_URL="https://github.com/mozilla/geckodriver/releases/download"
730+
RUN wget --no-verbose -O /tmp/geckodriver.tar.gz \
731+
"${GECKOD_URL}/v${GECKOD_VER}/geckodriver-v${GECKOD_VER}-linux64.tar.gz" \
732+
&& rm -rf /opt/geckodriver* \
733+
&& tar -C /opt -xvzf /tmp/geckodriver.tar.gz \
734+
&& mv /opt/geckodriver /usr/bin/geckodriver \
735+
&& chmod +x /usr/bin/geckodriver \
736+
&& ln -fs /usr/bin/geckodriver /opt/geckodriver \
737+
&& ln -fs /usr/bin/geckodriver ${FF_DEST}/geckodriver \
738+
&& ln -fs /usr/bin/geckodriver /usr/bin/wires \
739+
&& ln -fs /usr/bin/geckodriver ${FF_DEST}/wires \
740+
&& rm /tmp/geckodriver.tar.gz
704741

705742
# && rm -rf ${NORMAL_USER_HOME}/firefox-src
706743
# RUN mkdir -p ${NORMAL_USER_HOME}/firefox-src \
@@ -977,6 +1014,8 @@ ENV FIREFOX_VERSION="${FF_VER}" \
9771014
SELENIUM_NODE_PROXY_PARAMS="" \
9781015
# To taggle issue #58 see https://goo.gl/fz6RTu
9791016
CHROME_ARGS="--no-sandbox" \
1017+
# Will be passed with: -Dwebdriver.chrome.verboseLogging
1018+
CHROME_VERBOSELOGGING="true" \
9801019
# e.g. CHROME_ARGS="--no-sandbox --ignore-certificate-errors" \
9811020
# SELENIUM_NODE_CHROME_PARAMS='-Dselenium.chrome.args="--no-sandbox"' \
9821021
# WEBDRIVER_NODE_CHROME_PARAMS='-Dwebdriver.chrome.args="--no-sandbox"' \
@@ -1125,9 +1164,8 @@ ENV FIREFOX_VERSION="${FF_VER}" \
11251164
# Usage: docker run -v /var/run/docker.sock:/var/run/docker.sock
11261165
# -v $(which docker):$(which docker)
11271166
DOCKER_SOCK="/var/run/docker.sock" \
1128-
# DBUS hack thanks @pwaller
1129-
# https://github.com/SeleniumHQ/docker-selenium/issues/87#issuecomment-187659234
1130-
DBUS_SESSION_BUS_ADDRESS=/dev/null \
1167+
# for DBUS hacks, see entry.sh
1168+
# DBUS_SESSION_BUS_ADDRESS="unix:abstract=/dev/null" \
11311169
# Selenium test steps sleep
11321170
TEST_SLEEPS="0.5" \
11331171
# Restore

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,14 +256,14 @@ If the VNC password was randomly generated find out with
256256

257257
### Chrome crashed
258258

259-
If your tests crashes in Chrome you may need to increase shm size or simply start your container by sharing `-v /dev/shm:/dev/shm`
259+
If your tests crashes in Chrome you may need to increase shm size or simply start your container by sharing `-v /dev/shm:/dev/shm` or, alternatively, `--shm-size=1g`
260260

261261
docker run ... -v /dev/shm:/dev/shm
262262

263263
Alternatively you can increase it inside the container:
264264

265265
1. start docker in privileged mode: `docker run --privileged`
266-
2. increase shm size from default 64mb to something bigger:
266+
2. increase shm size from default 64mb or 68mb to something bigger:
267267

268268
```sh
269269
docker exec grid sudo umount /dev/shm

TBD_DOCKER_TAG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
+ Tested on kernel CI host: TBD_HOST_UNAME
1717
+ Built at dev host with: Docker version 1.12.1, build 23cf638
1818
+ Built at CI host with: Docker version TBD_DOCKER_VERS, build TBD_DOCKER_BUILD
19-
+ Built at dev host with: Docker Compose version 1.8.0, build f3628c7
19+
+ Built at dev host with: Docker Compose version 1.8.1, build 878cff1
2020
+ Built at CI host with: Docker Compose version TBD_DOCKER_COMPOSE_VERS, build TBD_DOCKER_COMPOSE_BUILD
2121
+ Image size: TBD_IMAGE_SIZE
2222
+ Digest: TBD_DIGEST

bin/entry.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
#!/usr/bin/env bash
22

3+
# set -e: exit asap if a command exits with a non-zero status
4+
set -e
5+
6+
# Workaround that might help to get dbus working in docker
7+
# http://stackoverflow.com/a/38355729/511069
8+
# https://github.com/SeleniumHQ/docker-selenium/issues/87#issuecomment-187659234
9+
# - still unclear if this helps: `-v /var/run/dbus:/var/run/dbus`
10+
# - this works generates errors: DBUS_SESSION_BUS_ADDRESS="/dev/null"
11+
# - this gives less erros: DBUS_SESSION_BUS_ADDRESS="unix:abstract=/dev/null"
12+
sudo rm -f /var/lib/dbus/machine-id
13+
sudo mkdir -p /var/run/dbus
14+
sudo service dbus restart
15+
# Test dbus works
16+
service dbus status
17+
export $(dbus-launch)
18+
export NSS_USE_SHARED_DB=ENABLED
19+
echo "-- INFO: DBUS_SESSION_BUS_ADDRESS=${DBUS_SESSION_BUS_ADDRESS}"
20+
echo "-- INFO: DBUS_SESSION_BUS_PID=${DBUS_SESSION_BUS_PID}"
21+
322
#-----------------------------------------------
423
# Perform cleanup to support `docker restart`
524
stop 2>&1 >/dev/null || true

docker-compose-host.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ services:
1515
image: elgalu/selenium
1616
network_mode: host
1717
shm_size: 1g
18+
# volumes:
19+
# - /var/run/dbus:/var/run/dbus
1820
environment:
1921
- SELENIUM_HUB_PORT
2022
- PICK_ALL_RANDMON_PORTS=true

docker-compose-jenkins.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ services:
2626
memswap_limit: 4g
2727
# 90000 means 90%
2828
# cpu_quota: 90000
29+
# volumes:
30+
# - /var/run/dbus:/var/run/dbus
2931
environment:
3032
- SELENIUM_HUB_PORT
3133
- VNC_FROM_PORT

0 commit comments

Comments
 (0)