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

Commit 7cf2715

Browse files
Merge branch 'trunk' of https://github.com/SeleniumHQ/docker-selenium into trunk
2 parents efedad1 + c371d99 commit 7cf2715

24 files changed

+501
-137
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,6 @@ body:
5555
attributes:
5656
label: Docker Selenium version (tag)
5757
description: What version of Docker Selenium are you using?
58-
placeholder: 4.4.0-20220812? Please use the full tag, avoid "latest"
58+
placeholder: 4.4.0-20220831? Please use the full tag, avoid "latest"
5959
validations:
6060
required: true

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
git config --local user.name "Selenium CI Bot"
8181
git commit -m "Update tag in docs and files [skip ci]" -a
8282
- name: Push changes
83-
uses: ad-m/github-push-action@a3fd843e49cd58d296bdd2431c4853569a1b900f # master
83+
uses: ad-m/github-push-action@40bf560936a8022e68a3c00e7d2abefaf01305a6 # master
8484
with:
8585
github_token: ${{ secrets.SELENIUM_CI_TOKEN }}
8686
branch: trunk
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: Update Dev/Beta Browser Images
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
# Trigger build every 2 days
7+
- cron: '0 2 */2 * *'
8+
9+
jobs:
10+
11+
deploy:
12+
13+
runs-on: ubuntu-latest
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
browser: [chrome,firefox,edge]
18+
channel: [dev,beta]
19+
env:
20+
NAME: selenium
21+
BROWSER: ${{ matrix.browser }}
22+
CHANNEL: ${{ matrix.channel }}
23+
24+
steps:
25+
- uses: actions/checkout@v3
26+
- name: Setup environment variables
27+
run: |
28+
export SELENIUM_VERSION=$(grep selenium-server Base/Dockerfile | sed 's/.*-\([^-]*\)\.jar \\/\1/' | head -n 1)
29+
echo "SELENIUM_VERSION="$SELENIUM_VERSION >> $GITHUB_ENV
30+
export BUILD_DATE=$(date '+%Y%m%d')
31+
echo "BUILD_DATE="$BUILD_DATE >> $GITHUB_ENV
32+
export BROWSER_CAPS=`node -p "process.argv[1][0].toUpperCase() + process.argv[1].toString().substring(1)" $BROWSER`
33+
echo "BROWSER_CAPS="$BROWSER_CAPS >> $GITHUB_ENV
34+
export CHANNEL_CAPS=`node -p "process.argv[1][0].toUpperCase() + process.argv[1].toString().substring(1)" $CHANNEL`
35+
echo "CHANNEL_CAPS="$CHANNEL_CAPS >> $GITHUB_ENV
36+
echo "BROWSER is $BROWSER"
37+
echo "CHANNEL is $CHANNEL"
38+
echo "SELENIUM_VERSION is $SELENIUM_VERSION"
39+
echo "BUILD_DATE is $BUILD_DATE"
40+
41+
- name: Pull hub and node-base and tag them for faster building and testing
42+
run: |
43+
docker pull $NAME/hub:latest
44+
docker pull $NAME/node-base:latest
45+
docker tag $NAME/hub:latest $NAME/hub:$CHANNEL
46+
docker tag $NAME/node-base:latest $NAME/node-base:$CHANNEL
47+
docker tag $NAME/hub:latest $NAME/hub:"$SELENIUM_VERSION"-"$BUILD_DATE"
48+
docker tag $NAME/node-base:latest $NAME/node-base:"$SELENIUM_VERSION"-"$BUILD_DATE"
49+
50+
- name: Build the Dev/Beta Docker container images
51+
run: |
52+
echo VERSION=$SELENIUM_VERSION make $BROWSER_$CHANNEL standalone_"$BROWSER"_"$CHANNEL"
53+
VERSION=$SELENIUM_VERSION make "$BROWSER"_"$CHANNEL" standalone_"$BROWSER"_"$CHANNEL"
54+
55+
- name: Test the Dev/Beta Docker container images
56+
run: |
57+
export SKIP_BUILD=true
58+
export NAMESPACE=$NAME
59+
VERSION=$CHANNEL ./tests/bootstrap.sh Node$BROWSER_CAPS
60+
VERSION=$CHANNEL ./tests/bootstrap.sh Standalone$BROWSER_CAPS
61+
62+
- name: Login Docker Hub
63+
run: docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
64+
env:
65+
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
66+
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
67+
68+
- name: Deploy Dev/Beta Docker container images
69+
run: |
70+
docker push $NAME/node-$BROWSER:$CHANNEL
71+
docker push $NAME/standalone-$BROWSER:$CHANNEL
72+
if [ "$BROWSER" = "firefox" ]; then
73+
export DRIVER_VERSION_COMMAND="/usr/bin/geckodriver --version | head -n 1"
74+
export BROWSER_VERSION_COMMAND="firefox -version"
75+
elif [ "$BROWSER" = "chrome" ]; then
76+
export DRIVER_VERSION_COMMAND="/usr/bin/chromedriver -version"
77+
export BROWSER_VERSION_COMMAND="google-chrome -version"
78+
elif [ "$BROWSER" = "edge" ]; then
79+
export DRIVER_VERSION_COMMAND="/usr/bin/msedgedriver -version"
80+
export BROWSER_VERSION_COMMAND="microsoft-edge -version"
81+
fi
82+
echo "Push to Docker Hub completed"
83+
echo "$BROWSER_CAPS $CHANNEL_CAPS browser version:"
84+
docker run --rm $NAME/standalone-$BROWSER:$CHANNEL bash -c "$BROWSER_VERSION_COMMAND"
85+
echo "$BROWSER_CAPS $CHANNEL_CAPS WebDriver version:"
86+
docker run --rm $NAME/standalone-$BROWSER:$CHANNEL bash -c "$DRIVER_VERSION_COMMAND"

Makefile

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,30 @@ node_base: base
6262
chrome: node_base
6363
cd ./NodeChrome && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/node-chrome:$(TAG_VERSION) .
6464

65+
chrome_dev:
66+
cd ./NodeChrome && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg CHROME_VERSION=google-chrome-unstable -t $(NAME)/node-chrome:dev .
67+
68+
chrome_beta:
69+
cd ./NodeChrome && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg CHROME_VERSION=google-chrome-beta -t $(NAME)/node-chrome:beta .
70+
6571
edge: node_base
6672
cd ./NodeEdge && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/node-edge:$(TAG_VERSION) .
6773

74+
edge_dev:
75+
cd ./NodeEdge && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg EDGE_VERSION=microsoft-edge-dev -t $(NAME)/node-edge:dev .
76+
77+
edge_beta:
78+
cd ./NodeEdge && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg EDGE_VERSION=microsoft-edge-beta -t $(NAME)/node-edge:beta .
79+
6880
firefox: node_base
6981
cd ./NodeFirefox && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/node-firefox:$(TAG_VERSION) .
7082

83+
firefox_dev:
84+
cd ./NodeFirefox && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg FIREFOX_VERSION=devedition-latest -t $(NAME)/node-firefox:dev .
85+
86+
firefox_beta:
87+
cd ./NodeFirefox && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg FIREFOX_VERSION=beta-latest -t $(NAME)/node-firefox:beta .
88+
7189
docker: base
7290
cd ./NodeDocker && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/node-docker:$(TAG_VERSION) .
7391

@@ -77,12 +95,30 @@ standalone_docker: docker
7795
standalone_firefox: firefox
7896
cd ./Standalone && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg BASE=node-firefox -t $(NAME)/standalone-firefox:$(TAG_VERSION) .
7997

98+
standalone_firefox_dev: firefox_dev
99+
cd ./Standalone && docker build $(BUILD_ARGS) --build-arg NAMESPACE=$(NAME) --build-arg VERSION=dev --build-arg BASE=node-firefox -t $(NAME)/standalone-firefox:dev .
100+
101+
standalone_firefox_beta: firefox_beta
102+
cd ./Standalone && docker build $(BUILD_ARGS) --build-arg NAMESPACE=$(NAME) --build-arg VERSION=beta --build-arg BASE=node-firefox -t $(NAME)/standalone-firefox:beta .
103+
80104
standalone_chrome: chrome
81105
cd ./Standalone && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg BASE=node-chrome -t $(NAME)/standalone-chrome:$(TAG_VERSION) .
82106

107+
standalone_chrome_dev: chrome_dev
108+
cd ./Standalone && docker build $(BUILD_ARGS) --build-arg NAMESPACE=$(NAME) --build-arg VERSION=dev --build-arg BASE=node-chrome -t $(NAME)/standalone-chrome:dev .
109+
110+
standalone_chrome_beta: chrome_beta
111+
cd ./Standalone && docker build $(BUILD_ARGS) --build-arg NAMESPACE=$(NAME) --build-arg VERSION=beta --build-arg BASE=node-chrome -t $(NAME)/standalone-chrome:beta .
112+
83113
standalone_edge: edge
84114
cd ./Standalone && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg BASE=node-edge -t $(NAME)/standalone-edge:$(TAG_VERSION) .
85115

116+
standalone_edge_dev: edge_dev
117+
cd ./Standalone && docker build $(BUILD_ARGS) --build-arg NAMESPACE=$(NAME) --build-arg VERSION=dev --build-arg BASE=node-edge -t $(NAME)/standalone-edge:dev .
118+
119+
standalone_edge_beta: edge_beta
120+
cd ./Standalone && docker build $(BUILD_ARGS) --build-arg NAMESPACE=$(NAME) --build-arg VERSION=beta --build-arg BASE=node-edge -t $(NAME)/standalone-edge:beta .
121+
86122
video:
87123
cd ./Video && docker build $(BUILD_ARGS) -t $(NAME)/video:$(FFMPEG_TAG_VERSION)-$(BUILD_DATE) .
88124

NodeBase/generate_config

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,12 @@ elif [[ "${SE_NODE_BROWSER_NAME}" == "MicrosoftEdge" ]]; then
6262
SE_NODE_BROWSER_VERSION=$(short_version $(microsoft-edge --version | awk '{print $3}'))
6363
fi
6464

65+
if [[ -z "$SE_NODE_STEREOTYPE" ]]; then
6566
SE_NODE_STEREOTYPE="{\"browserName\": \"${SE_NODE_BROWSER_NAME}\", \"browserVersion\": \"${SE_NODE_BROWSER_VERSION}\", \"platformName\": \"Linux\"}"
67+
else
68+
SE_NODE_STEREOTYPE="$SE_NODE_STEREOTYPE"
69+
fi
70+
6671
echo "[[node.driver-configuration]]" >> "$FILENAME"
6772
echo "display-name = \"${SE_NODE_BROWSER_NAME}\"" >> "$FILENAME"
6873
echo "stereotype = '${SE_NODE_STEREOTYPE}'" >> "$FILENAME"

NodeChrome/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,12 @@ USER 1200
4242
ARG CHROME_DRIVER_VERSION
4343
RUN if [ -z "$CHROME_DRIVER_VERSION" ]; \
4444
then CHROME_MAJOR_VERSION=$(google-chrome --version | sed -E "s/.* ([0-9]+)(\.[0-9]+){3}.*/\1/") \
45-
&& CHROME_DRIVER_VERSION=$(wget --no-verbose -O - "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROME_MAJOR_VERSION}"); \
45+
&& NO_SUCH_KEY=$(curl -ls https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROME_MAJOR_VERSION} | head -n 1 | grep -oe NoSuchKey) ; \
46+
if [ -n "$NO_SUCH_KEY" ]; then \
47+
echo "No Chromedriver for version $CHROME_MAJOR_VERSION. Use previous major version instead" \
48+
&& CHROME_MAJOR_VERSION=$(expr $CHROME_MAJOR_VERSION - 1); \
49+
fi ; \
50+
CHROME_DRIVER_VERSION=$(wget --no-verbose -O - "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROME_MAJOR_VERSION}"); \
4651
fi \
4752
&& echo "Using chromedriver version: "$CHROME_DRIVER_VERSION \
4853
&& wget --no-verbose -O /tmp/chromedriver_linux64.zip https://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip \

NodeDocker/config.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# Configs have a mapping between the Docker image to use and the capabilities that need to be matched to
33
# start a container with the given image.
44
configs = [
5-
"selenium/standalone-firefox:4.4.0-20220812", '{"browserName": "firefox", "platformName": "linux"}',
6-
"selenium/standalone-chrome:4.4.0-20220812", '{"browserName": "chrome", "platformName": "linux"}',
7-
"selenium/standalone-edge:4.4.0-20220812", '{"browserName": "MicrosoftEdge", "platformName": "linux"}'
5+
"selenium/standalone-firefox:4.4.0-20220831", '{"browserName": "firefox", "platformName": "linux"}',
6+
"selenium/standalone-chrome:4.4.0-20220831", '{"browserName": "chrome", "platformName": "linux"}',
7+
"selenium/standalone-edge:4.4.0-20220831", '{"browserName": "MicrosoftEdge", "platformName": "linux"}'
88
]
99

1010
# URL for connecting to the docker daemon
@@ -14,7 +14,7 @@ configs = [
1414
# socat -4 TCP-LISTEN:2375,fork UNIX-CONNECT:/var/run/docker.sock
1515
url = "http://127.0.0.1:2375"
1616
# Docker image used for video recording
17-
video-image = "selenium/video:ffmpeg-4.3.1-20220812"
17+
video-image = "selenium/video:ffmpeg-4.3.1-20220831"
1818

1919
# Uncomment the following section if you are running the node on a separate VM
2020
# Fill out the placeholders with appropriate values

NodeFirefox/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ USER root
1010
# Firefox
1111
#=========
1212
ARG FIREFOX_VERSION=latest
13-
RUN FIREFOX_DOWNLOAD_URL=$(if [ $FIREFOX_VERSION = "latest" ] || [ $FIREFOX_VERSION = "nightly-latest" ] || [ $FIREFOX_VERSION = "devedition-latest" ] || [ $FIREFOX_VERSION = "esr-latest" ]; then echo "https://download.mozilla.org/?product=firefox-$FIREFOX_VERSION-ssl&os=linux64&lang=en-US"; else echo "https://download-installer.cdn.mozilla.net/pub/firefox/releases/$FIREFOX_VERSION/linux-x86_64/en-US/firefox-$FIREFOX_VERSION.tar.bz2"; fi) \
13+
RUN FIREFOX_DOWNLOAD_URL=$(if [ $FIREFOX_VERSION = "latest" ] || [ $FIREFOX_VERSION = "beta-latest" ] || [ $FIREFOX_VERSION = "nightly-latest" ] || [ $FIREFOX_VERSION = "devedition-latest" ] || [ $FIREFOX_VERSION = "esr-latest" ]; then echo "https://download.mozilla.org/?product=firefox-$FIREFOX_VERSION-ssl&os=linux64&lang=en-US"; else echo "https://download-installer.cdn.mozilla.net/pub/firefox/releases/$FIREFOX_VERSION/linux-x86_64/en-US/firefox-$FIREFOX_VERSION.tar.bz2"; fi) \
1414
&& apt-get update -qqy \
1515
&& apt-get -qqy --no-install-recommends install firefox libavcodec-extra \
1616
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* \

0 commit comments

Comments
 (0)