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

Commit

Permalink
Merging changes from upstream and SeleniumHQ#1656
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmortensen committed Aug 19, 2022
2 parents 0f28213 + 7010a13 commit efedad1
Show file tree
Hide file tree
Showing 51 changed files with 176 additions and 1,098 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,4 @@ ENV/

# End of https://www.gitignore.io/api/python
.DS_Store
release_sandbox

11 changes: 5 additions & 6 deletions Distributor/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED.
# PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
FROM selenium/base:4.4.0-20220812
LABEL authors=SeleniumHQ
ARG NAMESPACE
ARG VERSION
ARG AUTHORS
FROM ${NAMESPACE}/base:${VERSION}
LABEL authors=${AUTHORS}

USER 1200

Expand Down
12 changes: 0 additions & 12 deletions Distributor/Dockerfile.txt

This file was deleted.

14 changes: 0 additions & 14 deletions Distributor/generate.sh

This file was deleted.

11 changes: 5 additions & 6 deletions EventBus/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED.
# PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
FROM selenium/base:4.4.0-20220812
LABEL authors=SeleniumHQ
ARG NAMESPACE
ARG VERSION
ARG AUTHORS
FROM ${NAMESPACE}/base:${VERSION}
LABEL authors=${AUTHORS}

USER 1200

Expand Down
17 changes: 0 additions & 17 deletions EventBus/Dockerfile.txt

This file was deleted.

14 changes: 0 additions & 14 deletions EventBus/generate.sh

This file was deleted.

11 changes: 5 additions & 6 deletions Hub/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED.
# PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
FROM selenium/base:4.4.0-20220812
LABEL authors=SeleniumHQ
ARG NAMESPACE
ARG VERSION
ARG AUTHORS
FROM ${NAMESPACE}/base:${VERSION}
LABEL authors=${AUTHORS}

USER 1200

Expand Down
21 changes: 0 additions & 21 deletions Hub/Dockerfile.txt

This file was deleted.

14 changes: 0 additions & 14 deletions Hub/generate.sh

This file was deleted.

183 changes: 43 additions & 140 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ TAG_VERSION := $(VERSION)-$(BUILD_DATE)
NAMESPACE := $(or $(NAMESPACE),$(NAMESPACE),$(NAME))
AUTHORS := $(or $(AUTHORS),$(AUTHORS),SeleniumHQ)
PUSH_IMAGE := $(or $(PUSH_IMAGE),$(PUSH_IMAGE),false)
FROM_IMAGE_ARGS := --build-arg NAMESPACE=$(NAMESPACE) --build-arg VERSION=$(TAG_VERSION) --build-arg AUTHORS=$(AUTHORS)
BUILD_ARGS := $(BUILD_ARGS)
MAJOR := $(word 1,$(subst ., ,$(TAG_VERSION)))
MINOR := $(word 2,$(subst ., ,$(TAG_VERSION)))
Expand All @@ -29,22 +30,6 @@ all: hub \
standalone_docker \
video

generate_all: \
generate_hub \
generate_distributor \
generate_router \
generate_sessions \
generate_sessionqueue \
generate_event_bus \
generate_node_base \
generate_chrome \
generate_edge \
generate_firefox \
generate_docker \
generate_standalone_firefox \
generate_standalone_chrome \
generate_standalone_edge \
generate_standalone_docker

build: all

Expand All @@ -53,95 +38,50 @@ ci: build test
base:
cd ./Base && docker build $(BUILD_ARGS) -t $(NAME)/base:$(TAG_VERSION) .

generate_hub:
cd ./Hub && ./generate.sh $(TAG_VERSION) $(NAMESPACE) $(AUTHORS)
hub: base
cd ./Hub && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/hub:$(TAG_VERSION) .

hub: base generate_hub
cd ./Hub && docker build $(BUILD_ARGS) -t $(NAME)/hub:$(TAG_VERSION) .
distributor: base
cd ./Distributor && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/distributor:$(TAG_VERSION) .

generate_distributor:
cd ./Distributor && ./generate.sh $(TAG_VERSION) $(NAMESPACE) $(AUTHORS)
router: base
cd ./Router && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/router:$(TAG_VERSION) .

distributor: base generate_distributor
cd ./Distributor && docker build $(BUILD_ARGS) -t $(NAME)/distributor:$(TAG_VERSION) .
sessions: base
cd ./Sessions && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/sessions:$(TAG_VERSION) .

generate_router:
cd ./Router && ./generate.sh $(TAG_VERSION) $(NAMESPACE) $(AUTHORS)
sessionqueue: base
cd ./SessionQueue && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/session-queue:$(TAG_VERSION) .

router: base generate_router
cd ./Router && docker build $(BUILD_ARGS) -t $(NAME)/router:$(TAG_VERSION) .
event_bus: base
cd ./EventBus && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/event-bus:$(TAG_VERSION) .

generate_sessions:
cd ./Sessions && ./generate.sh $(TAG_VERSION) $(NAMESPACE) $(AUTHORS)
node_base: base
cd ./NodeBase && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/node-base:$(TAG_VERSION) .

sessions: base generate_sessions
cd ./Sessions && docker build $(BUILD_ARGS) -t $(NAME)/sessions:$(TAG_VERSION) .
chrome: node_base
cd ./NodeChrome && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/node-chrome:$(TAG_VERSION) .

generate_sessionqueue:
cd ./SessionQueue && ./generate.sh $(TAG_VERSION) $(NAMESPACE) $(AUTHORS)
edge: node_base
cd ./NodeEdge && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/node-edge:$(TAG_VERSION) .

sessionqueue: base generate_sessionqueue
cd ./SessionQueue && docker build $(BUILD_ARGS) -t $(NAME)/session-queue:$(TAG_VERSION) .
firefox: node_base
cd ./NodeFirefox && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/node-firefox:$(TAG_VERSION) .

generate_event_bus:
cd ./EventBus && ./generate.sh $(TAG_VERSION) $(NAMESPACE) $(AUTHORS)
docker: base
cd ./NodeDocker && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/node-docker:$(TAG_VERSION) .

event_bus: base generate_event_bus
cd ./EventBus && docker build $(BUILD_ARGS) -t $(NAME)/event-bus:$(TAG_VERSION) .
standalone_docker: docker
cd ./StandaloneDocker && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/standalone-docker:$(TAG_VERSION) .

generate_node_base:
cd ./NodeBase && ./generate.sh $(TAG_VERSION) $(NAMESPACE) $(AUTHORS)
standalone_firefox: firefox
cd ./Standalone && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg BASE=node-firefox -t $(NAME)/standalone-firefox:$(TAG_VERSION) .

node_base: base generate_node_base
cd ./NodeBase && docker build $(BUILD_ARGS) -t $(NAME)/node-base:$(TAG_VERSION) .
standalone_chrome: chrome
cd ./Standalone && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg BASE=node-chrome -t $(NAME)/standalone-chrome:$(TAG_VERSION) .

generate_chrome:
cd ./NodeChrome && ./generate.sh $(TAG_VERSION) $(NAMESPACE) $(AUTHORS)

chrome: node_base generate_chrome
cd ./NodeChrome && docker build $(BUILD_ARGS) -t $(NAME)/node-chrome:$(TAG_VERSION) .

generate_edge:
cd ./NodeEdge && ./generate.sh $(TAG_VERSION) $(NAMESPACE) $(AUTHORS)

edge: node_base generate_edge
cd ./NodeEdge && docker build $(BUILD_ARGS) -t $(NAME)/node-edge:$(TAG_VERSION) .

generate_firefox:
cd ./NodeFirefox && ./generate.sh $(TAG_VERSION) $(NAMESPACE) $(AUTHORS)

firefox: node_base generate_firefox
cd ./NodeFirefox && docker build $(BUILD_ARGS) -t $(NAME)/node-firefox:$(TAG_VERSION) .

generate_docker:
cd ./NodeDocker && ./generate.sh $(TAG_VERSION) $(NAMESPACE) $(AUTHORS)

docker: base generate_docker
cd ./NodeDocker && docker build $(BUILD_ARGS) -t $(NAME)/node-docker:$(TAG_VERSION) .

generate_standalone_docker:
cd ./StandaloneDocker && ./generate.sh $(TAG_VERSION) $(NAMESPACE) $(AUTHORS)

standalone_docker: docker generate_standalone_docker
cd ./StandaloneDocker && docker build $(BUILD_ARGS) -t $(NAME)/standalone-docker:$(TAG_VERSION) .

generate_standalone_firefox:
cd ./Standalone && ./generate.sh StandaloneFirefox node-firefox $(TAG_VERSION) $(NAMESPACE) $(AUTHORS)

standalone_firefox: firefox generate_standalone_firefox
cd ./StandaloneFirefox && docker build $(BUILD_ARGS) -t $(NAME)/standalone-firefox:$(TAG_VERSION) .

generate_standalone_chrome:
cd ./Standalone && ./generate.sh StandaloneChrome node-chrome $(TAG_VERSION) $(NAMESPACE) $(AUTHORS)

standalone_chrome: chrome generate_standalone_chrome
cd ./StandaloneChrome && docker build $(BUILD_ARGS) -t $(NAME)/standalone-chrome:$(TAG_VERSION) .

generate_standalone_edge:
cd ./Standalone && ./generate.sh StandaloneEdge node-edge $(TAG_VERSION) $(NAMESPACE) $(AUTHORS)

standalone_edge: edge generate_standalone_edge
cd ./StandaloneEdge && docker build $(BUILD_ARGS) -t $(NAME)/standalone-edge:$(TAG_VERSION) .
standalone_edge: edge
cd ./Standalone && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg BASE=node-edge -t $(NAME)/standalone-edge:$(TAG_VERSION) .

video:
cd ./Video && docker build $(BUILD_ARGS) -t $(NAME)/video:$(FFMPEG_TAG_VERSION)-$(BUILD_DATE) .
Expand All @@ -162,51 +102,30 @@ all_multi: base_multi \
standalone_chromium_multi \
standalone_firefox_multi

generate_all_multi: \
generate_hub \
generate_node_base \
generate_chromium_multi \
generate_firefox_multi \
generate_standalone_chromium_multi \
generate_standalone_firefox_multi

build_multi: all_multi

ci_multi: build_multi test_multi_arch

base_multi: qemu_user_static
cd ./Base && docker buildx build --platform $(PLATFORMS) $(BUILD_ARGS) -t $(NAME)/base:$(TAG_VERSION) .

hub_multi: base_multi generate_hub
cd ./Hub && docker buildx build --platform $(PLATFORMS) $(BUILD_ARGS) -t $(NAME)/hub:$(TAG_VERSION) .

node_base_multi: base_multi generate_node_base
cd ./NodeBase && docker buildx build --platform $(PLATFORMS) $(BUILD_ARGS) -t $(NAME)/node-base:$(TAG_VERSION) .

generate_chromium_multi:
cd ./NodeChromium && ./generate.sh $(TAG_VERSION) $(NAMESPACE) $(AUTHORS)

chromium_multi: node_base_multi generate_chromium_multi
cd ./NodeChromium && docker buildx build --platform $(PLATFORMS) $(BUILD_ARGS) -t $(NAME)/node-chromium:$(TAG_VERSION) .

# TODO: Need to make sure arguments are passed into the script to override defaults.
generate_firefox_multi:
cd ./NodeFirefox && ./generate-arm.sh $(TAG_VERSION) $(NAMESPACE) $(AUTHORS)
hub_multi: base_multi
cd ./Hub && docker buildx build --platform $(PLATFORMS) $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/hub:$(TAG_VERSION) .

firefox_multi: node_base_multi generate_firefox_multi
cd ./NodeFirefox && docker buildx build --platform $(PLATFORMS) $(BUILD_ARGS) -t $(NAME)/node-firefox:$(TAG_VERSION) .
node_base_multi: base_multi
cd ./NodeBase && docker buildx build --platform $(PLATFORMS) $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/node-base:$(TAG_VERSION) .

generate_standalone_firefox_multi:
cd ./Standalone && ./generate.sh StandaloneFirefox node-firefox $(TAG_VERSION) $(NAMESPACE) $(AUTHORS)
chromium_multi: node_base_multi
cd ./NodeChromium && docker buildx build --platform $(PLATFORMS) $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/node-chromium:$(TAG_VERSION) .

standalone_firefox_multi: firefox_multi generate_standalone_firefox_multi
cd ./StandaloneFirefox && docker buildx build --platform $(PLATFORMS) $(BUILD_ARGS) -t $(NAME)/standalone-firefox:$(TAG_VERSION) .
firefox_multi: node_base_multi
cd ./NodeFirefox && docker buildx build -f Dockerfile.arm64 --platform $(PLATFORMS) $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/node-firefox:$(TAG_VERSION) .

generate_standalone_chromium_multi:
cd ./Standalone && ./generate.sh StandaloneChromium node-chromium $(TAG_VERSION) $(NAMESPACE) $(AUTHORS)
standalone_firefox_multi: firefox_multi
cd ./Standalone && docker buildx build --platform $(PLATFORMS) $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg BASE=node-firefox -t $(NAME)/standalone-firefox:$(TAG_VERSION) .

standalone_chromium_multi: chromium_multi generate_standalone_chromium_multi
cd ./StandaloneChromium && docker buildx build --platform $(PLATFORMS) $(BUILD_ARGS) -t $(NAME)/standalone-chromium:$(TAG_VERSION) .
standalone_chromium_multi: chromium_multi
cd ./Standalone && docker buildx build --platform $(PLATFORMS) $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg BASE=node-chromium -t $(NAME)/standalone-chromium:$(TAG_VERSION) .

# https://github.com/SeleniumHQ/docker-selenium/issues/992
# Additional tags for browser images
Expand Down Expand Up @@ -495,22 +414,6 @@ test_video: video hub chrome firefox edge
edge \
firefox \
docker \
generate_all \
generate_hub \
generate_distributor \
generate_router \
generate_sessions \
generate_sessionqueue \
generate_event_bus \
generate_node_base \
generate_chrome \
generate_edge \
generate_firefox \
generate_docker \
generate_standalone_chrome \
generate_standalone_edge \
generate_standalone_firefox \
generate_standalone_docker \
hub \
distributor \
router \
Expand Down
Loading

0 comments on commit efedad1

Please sign in to comment.