From 78908d11089538480ef67231eda80033d7d371bc Mon Sep 17 00:00:00 2001 From: James Mortensen Date: Mon, 15 Aug 2022 10:13:04 +0000 Subject: [PATCH 01/26] Added build steps to build Chrome Beta and Firefox Beta nodes and standalone from the makefile. --- Distributor/Dockerfile | 2 +- EventBus/Dockerfile | 2 +- Hub/Dockerfile | 2 +- Makefile | 28 ++++++++++++++++++++++++++++ NodeBase/Dockerfile | 2 +- NodeChrome/Dockerfile | 2 +- NodeDocker/Dockerfile | 2 +- NodeEdge/Dockerfile | 2 +- NodeFirefox/Dockerfile | 4 ++-- NodeFirefox/Dockerfile.txt | 2 +- Router/Dockerfile | 2 +- SessionQueue/Dockerfile | 2 +- Sessions/Dockerfile | 2 +- StandaloneChrome/Dockerfile | 2 +- StandaloneDocker/Dockerfile | 2 +- StandaloneEdge/Dockerfile | 2 +- StandaloneFirefox/Dockerfile | 2 +- 17 files changed, 45 insertions(+), 17 deletions(-) diff --git a/Distributor/Dockerfile b/Distributor/Dockerfile index 91a3c9cc3..9d5de62d3 100644 --- a/Distributor/Dockerfile +++ b/Distributor/Dockerfile @@ -2,7 +2,7 @@ # NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED. # PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -FROM selenium/base:4.4.0-20220812 +FROM selenium/base:4.4.0-20220815 LABEL authors=SeleniumHQ USER 1200 diff --git a/EventBus/Dockerfile b/EventBus/Dockerfile index b3f0df85f..29b5f21fd 100644 --- a/EventBus/Dockerfile +++ b/EventBus/Dockerfile @@ -2,7 +2,7 @@ # NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED. # PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -FROM selenium/base:4.4.0-20220812 +FROM selenium/base:4.4.0-20220815 LABEL authors=SeleniumHQ USER 1200 diff --git a/Hub/Dockerfile b/Hub/Dockerfile index ffaf26a10..63b8dcad8 100644 --- a/Hub/Dockerfile +++ b/Hub/Dockerfile @@ -2,7 +2,7 @@ # NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED. # PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -FROM selenium/base:4.4.0-20220812 +FROM selenium/base:4.4.0-20220815 LABEL authors=SeleniumHQ USER 1200 diff --git a/Makefile b/Makefile index 3902c8b7a..916000efe 100644 --- a/Makefile +++ b/Makefile @@ -19,12 +19,16 @@ all: hub \ sessionqueue \ event_bus \ chrome \ + chrome_beta \ edge \ firefox \ + firefox_beta \ docker \ standalone_chrome \ + standalone_chrome_beta \ standalone_edge \ standalone_firefox \ + standalone_firefox_beta \ standalone_docker \ video @@ -100,6 +104,9 @@ generate_chrome: chrome: node_base generate_chrome cd ./NodeChrome && docker build $(BUILD_ARGS) -t $(NAME)/node-chrome:$(TAG_VERSION) . +chrome_beta: node_base generate_chrome + cd ./NodeChrome && docker build $(BUILD_ARGS) --build-arg CHROME_VERSION=google-chrome-beta -t $(NAME)/node-chrome:$(TAG_VERSION)-beta . + generate_edge: cd ./NodeEdge && ./generate.sh $(TAG_VERSION) $(NAMESPACE) $(AUTHORS) @@ -112,6 +119,9 @@ generate_firefox: firefox: node_base generate_firefox cd ./NodeFirefox && docker build $(BUILD_ARGS) -t $(NAME)/node-firefox:$(TAG_VERSION) . +firefox_beta: node_base generate_firefox + cd ./NodeFirefox && docker build $(BUILD_ARGS) --build-arg FIREFOX_VERSION=beta-latest -t $(NAME)/node-firefox:$(TAG_VERSION)-beta . + generate_docker: cd ./NodeDocker && ./generate.sh $(TAG_VERSION) $(NAMESPACE) $(AUTHORS) @@ -127,15 +137,27 @@ standalone_docker: docker generate_standalone_docker generate_standalone_firefox: cd ./Standalone && ./generate.sh StandaloneFirefox node-firefox $(TAG_VERSION) $(NAMESPACE) $(AUTHORS) +generate_standalone_firefox_beta: + cd ./Standalone && ./generate.sh StandaloneFirefox node-firefox $(TAG_VERSION)-beta $(NAMESPACE) $(AUTHORS) + standalone_firefox: firefox generate_standalone_firefox cd ./StandaloneFirefox && docker build $(BUILD_ARGS) -t $(NAME)/standalone-firefox:$(TAG_VERSION) . +standalone_firefox_beta: firefox generate_standalone_firefox_beta + cd ./StandaloneFirefox && docker build $(BUILD_ARGS) -t $(NAME)/standalone-firefox:$(TAG_VERSION)-beta . + generate_standalone_chrome: cd ./Standalone && ./generate.sh StandaloneChrome node-chrome $(TAG_VERSION) $(NAMESPACE) $(AUTHORS) +generate_standalone_chrome_beta: + cd ./Standalone && ./generate.sh StandaloneChrome node-chrome $(TAG_VERSION)-beta $(NAMESPACE) $(AUTHORS) + standalone_chrome: chrome generate_standalone_chrome cd ./StandaloneChrome && docker build $(BUILD_ARGS) -t $(NAME)/standalone-chrome:$(TAG_VERSION) . +standalone_chrome_beta: chrome generate_standalone_chrome_beta + cd ./StandaloneChrome && docker build $(BUILD_ARGS) -t $(NAME)/standalone-chrome:$(TAG_VERSION)-beta . + generate_standalone_edge: cd ./Standalone && ./generate.sh StandaloneEdge node-edge $(TAG_VERSION) $(NAMESPACE) $(AUTHORS) @@ -391,8 +413,10 @@ test_video: video hub chrome firefox edge build \ ci \ chrome \ + chrome_beta \ edge \ firefox \ + firefox_beta \ docker \ generate_all \ generate_hub \ @@ -407,8 +431,10 @@ test_video: video hub chrome firefox edge generate_firefox \ generate_docker \ generate_standalone_chrome \ + generate_standalone_chrome_beta \ generate_standalone_edge \ generate_standalone_firefox \ + generate_standalone_firefox_beta \ generate_standalone_docker \ hub \ distributor \ @@ -419,8 +445,10 @@ test_video: video hub chrome firefox edge node_base \ release \ standalone_chrome \ + standalone_chrome_beta \ standalone_edge \ standalone_firefox \ + standalone_firefox_beta \ standalone_docker \ tag_latest \ tag_and_push_browser_images \ diff --git a/NodeBase/Dockerfile b/NodeBase/Dockerfile index af3100078..d499fe00e 100644 --- a/NodeBase/Dockerfile +++ b/NodeBase/Dockerfile @@ -2,7 +2,7 @@ # NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED. # PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -FROM selenium/base:4.4.0-20220812 +FROM selenium/base:4.4.0-20220815 LABEL authors=SeleniumHQ USER root diff --git a/NodeChrome/Dockerfile b/NodeChrome/Dockerfile index 7c526358d..2efce306b 100644 --- a/NodeChrome/Dockerfile +++ b/NodeChrome/Dockerfile @@ -2,7 +2,7 @@ # NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED. # PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -FROM selenium/node-base:4.4.0-20220812 +FROM selenium/node-base:4.4.0-20220815 LABEL authors=SeleniumHQ USER root diff --git a/NodeDocker/Dockerfile b/NodeDocker/Dockerfile index 42efe6951..32c118c49 100644 --- a/NodeDocker/Dockerfile +++ b/NodeDocker/Dockerfile @@ -2,7 +2,7 @@ # NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED. # PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -FROM selenium/base:4.4.0-20220812 +FROM selenium/base:4.4.0-20220815 LABEL authors=SeleniumHQ USER root diff --git a/NodeEdge/Dockerfile b/NodeEdge/Dockerfile index 0679294b7..1e7ac0aba 100644 --- a/NodeEdge/Dockerfile +++ b/NodeEdge/Dockerfile @@ -2,7 +2,7 @@ # NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED. # PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -FROM selenium/node-base:4.4.0-20220812 +FROM selenium/node-base:4.4.0-20220815 LABEL authors=SeleniumHQ USER root diff --git a/NodeFirefox/Dockerfile b/NodeFirefox/Dockerfile index 2704b44ae..f4e501acf 100644 --- a/NodeFirefox/Dockerfile +++ b/NodeFirefox/Dockerfile @@ -2,7 +2,7 @@ # NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED. # PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -FROM selenium/node-base:4.4.0-20220812 +FROM selenium/node-base:4.4.0-20220815 LABEL authors=SeleniumHQ USER root @@ -11,7 +11,7 @@ USER root # Firefox #========= ARG FIREFOX_VERSION=latest -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) \ +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) \ && apt-get update -qqy \ && apt-get -qqy --no-install-recommends install firefox libavcodec-extra \ && rm -rf /var/lib/apt/lists/* /var/cache/apt/* \ diff --git a/NodeFirefox/Dockerfile.txt b/NodeFirefox/Dockerfile.txt index 27db2bd93..b6a7bf491 100644 --- a/NodeFirefox/Dockerfile.txt +++ b/NodeFirefox/Dockerfile.txt @@ -4,7 +4,7 @@ USER root # Firefox #========= ARG FIREFOX_VERSION=latest -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) \ +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) \ && apt-get update -qqy \ && apt-get -qqy --no-install-recommends install firefox libavcodec-extra \ && rm -rf /var/lib/apt/lists/* /var/cache/apt/* \ diff --git a/Router/Dockerfile b/Router/Dockerfile index 8d92093da..84201b76c 100644 --- a/Router/Dockerfile +++ b/Router/Dockerfile @@ -2,7 +2,7 @@ # NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED. # PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -FROM selenium/base:4.4.0-20220812 +FROM selenium/base:4.4.0-20220815 LABEL authors=SeleniumHQ USER 1200 diff --git a/SessionQueue/Dockerfile b/SessionQueue/Dockerfile index a9ba7819e..f9d374efa 100644 --- a/SessionQueue/Dockerfile +++ b/SessionQueue/Dockerfile @@ -2,7 +2,7 @@ # NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED. # PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -FROM selenium/base:4.4.0-20220812 +FROM selenium/base:4.4.0-20220815 LABEL authors=SeleniumHQ USER 1200 diff --git a/Sessions/Dockerfile b/Sessions/Dockerfile index a64505454..dccc5159e 100644 --- a/Sessions/Dockerfile +++ b/Sessions/Dockerfile @@ -2,7 +2,7 @@ # NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED. # PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -FROM selenium/base:4.4.0-20220812 +FROM selenium/base:4.4.0-20220815 LABEL authors=SeleniumHQ USER 1200 diff --git a/StandaloneChrome/Dockerfile b/StandaloneChrome/Dockerfile index bfb50dc70..4005cd76e 100644 --- a/StandaloneChrome/Dockerfile +++ b/StandaloneChrome/Dockerfile @@ -2,7 +2,7 @@ # NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED. # PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -FROM selenium/node-chrome:4.4.0-20220812 +FROM selenium/node-chrome:4.4.0-20220815-beta LABEL authors=SeleniumHQ USER 1200 diff --git a/StandaloneDocker/Dockerfile b/StandaloneDocker/Dockerfile index 335e29310..5dce1e68e 100644 --- a/StandaloneDocker/Dockerfile +++ b/StandaloneDocker/Dockerfile @@ -2,7 +2,7 @@ # NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED. # PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -FROM selenium/node-docker:4.4.0-20220812 +FROM selenium/node-docker:4.4.0-20220815 LABEL authors=SeleniumHQ USER 1200 diff --git a/StandaloneEdge/Dockerfile b/StandaloneEdge/Dockerfile index 69a2c73c8..dc39124cf 100644 --- a/StandaloneEdge/Dockerfile +++ b/StandaloneEdge/Dockerfile @@ -2,7 +2,7 @@ # NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED. # PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -FROM selenium/node-edge:4.4.0-20220812 +FROM selenium/node-edge:4.4.0-20220815 LABEL authors=SeleniumHQ USER 1200 diff --git a/StandaloneFirefox/Dockerfile b/StandaloneFirefox/Dockerfile index 008b7d114..b04c38a37 100644 --- a/StandaloneFirefox/Dockerfile +++ b/StandaloneFirefox/Dockerfile @@ -2,7 +2,7 @@ # NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED. # PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -FROM selenium/node-firefox:4.4.0-20220812 +FROM selenium/node-firefox:4.4.0-20220815-beta LABEL authors=SeleniumHQ USER 1200 From 321852be4bf1a68c8f4036c3010d532c3a645f86 Mon Sep 17 00:00:00 2001 From: James Mortensen Date: Tue, 16 Aug 2022 11:10:52 +0530 Subject: [PATCH 02/26] Adding steps to deploy the beta browser versions with basic TAG_VERSION --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile b/Makefile index 916000efe..e58d1a582 100644 --- a/Makefile +++ b/Makefile @@ -279,12 +279,16 @@ release: tag_major_minor @if ! docker images $(NAME)/event-bus | awk '{ print $$2 }' | grep -q -F $(TAG_VERSION); then echo "$(NAME)/event-bus version $(TAG_VERSION) is not yet built. Please run 'make build'"; false; fi @if ! docker images $(NAME)/node-base | awk '{ print $$2 }' | grep -q -F $(TAG_VERSION); then echo "$(NAME)/node-base version $(TAG_VERSION) is not yet built. Please run 'make build'"; false; fi @if ! docker images $(NAME)/node-chrome | awk '{ print $$2 }' | grep -q -F $(TAG_VERSION); then echo "$(NAME)/node-chrome version $(TAG_VERSION) is not yet built. Please run 'make build'"; false; fi + @if ! docker images $(NAME)/node-chrome | awk '{ print $$2 }' | grep -q -F $(TAG_VERSION)-beta; then echo "$(NAME)/node-chrome version $(TAG_VERSION)-beta is not yet built. Please run 'make build'"; false; fi @if ! docker images $(NAME)/node-edge | awk '{ print $$2 }' | grep -q -F $(TAG_VERSION); then echo "$(NAME)/node-edge version $(TAG_VERSION) is not yet built. Please run 'make build'"; false; fi @if ! docker images $(NAME)/node-firefox | awk '{ print $$2 }' | grep -q -F $(TAG_VERSION); then echo "$(NAME)/node-firefox version $(TAG_VERSION) is not yet built. Please run 'make build'"; false; fi + @if ! docker images $(NAME)/node-firefox | awk '{ print $$2 }' | grep -q -F $(TAG_VERSION)-beta; then echo "$(NAME)/node-firefox version $(TAG_VERSION)-beta is not yet built. Please run 'make build'"; false; fi @if ! docker images $(NAME)/node-docker | awk '{ print $$2 }' | grep -q -F $(TAG_VERSION); then echo "$(NAME)/node-docker version $(TAG_VERSION) is not yet built. Please run 'make build'"; false; fi @if ! docker images $(NAME)/standalone-chrome | awk '{ print $$2 }' | grep -q -F $(TAG_VERSION); then echo "$(NAME)/standalone-chrome version $(TAG_VERSION) is not yet built. Please run 'make build'"; false; fi + @if ! docker images $(NAME)/standalone-chrome | awk '{ print $$2 }' | grep -q -F $(TAG_VERSION)-beta; then echo "$(NAME)/standalone-chrome version $(TAG_VERSION)-beta is not yet built. Please run 'make build'"; false; fi @if ! docker images $(NAME)/standalone-edge | awk '{ print $$2 }' | grep -q -F $(TAG_VERSION); then echo "$(NAME)/standalone-edge version $(TAG_VERSION) is not yet built. Please run 'make build'"; false; fi @if ! docker images $(NAME)/standalone-firefox | awk '{ print $$2 }' | grep -q -F $(TAG_VERSION); then echo "$(NAME)/standalone-firefox version $(TAG_VERSION) is not yet built. Please run 'make build'"; false; fi + @if ! docker images $(NAME)/standalone-firefox | awk '{ print $$2 }' | grep -q -F $(TAG_VERSION)-beta; then echo "$(NAME)/standalone-firefox version $(TAG_VERSION)-beta is not yet built. Please run 'make build'"; false; fi @if ! docker images $(NAME)/standalone-docker | awk '{ print $$2 }' | grep -q -F $(TAG_VERSION); then echo "$(NAME)/standalone-docker version $(TAG_VERSION) is not yet built. Please run 'make build'"; false; fi docker push $(NAME)/base:$(TAG_VERSION) docker push $(NAME)/hub:$(TAG_VERSION) @@ -295,12 +299,16 @@ release: tag_major_minor docker push $(NAME)/event-bus:$(TAG_VERSION) docker push $(NAME)/node-base:$(TAG_VERSION) docker push $(NAME)/node-chrome:$(TAG_VERSION) + docker push $(NAME)/node-chrome:$(TAG_VERSION)-beta docker push $(NAME)/node-edge:$(TAG_VERSION) docker push $(NAME)/node-firefox:$(TAG_VERSION) + docker push $(NAME)/node-firefox:$(TAG_VERSION)-beta docker push $(NAME)/node-docker:$(TAG_VERSION) docker push $(NAME)/standalone-chrome:$(TAG_VERSION) + docker push $(NAME)/standalone-chrome:$(TAG_VERSION)-beta docker push $(NAME)/standalone-edge:$(TAG_VERSION) docker push $(NAME)/standalone-firefox:$(TAG_VERSION) + docker push $(NAME)/standalone-firefox:$(TAG_VERSION)-beta docker push $(NAME)/standalone-docker:$(TAG_VERSION) docker push $(NAME)/base:$(MAJOR) docker push $(NAME)/hub:$(MAJOR) From 5688bdab30a3d81dd76923eafa1e694aa3587053 Mon Sep 17 00:00:00 2001 From: James Mortensen Date: Sat, 20 Aug 2022 17:59:37 +0530 Subject: [PATCH 03/26] Create update-dev-beta-browser-images.yml --- .../update-dev-beta-browser-images.yml | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/update-dev-beta-browser-images.yml diff --git a/.github/workflows/update-dev-beta-browser-images.yml b/.github/workflows/update-dev-beta-browser-images.yml new file mode 100644 index 000000000..495aa5fdb --- /dev/null +++ b/.github/workflows/update-dev-beta-browser-images.yml @@ -0,0 +1,24 @@ +name: Update Dev/Beta Browser Images + +on: + workflow_dispatch: + +jobs: + + build: + + runs-on: ubuntu-latest + env: | + NAME: selenium + + steps: + - uses: actions/checkout@v3 + - name: Build the Dev/Beta Docker container images + run: | + make chrome_beta firefox_beta standalone_chrome_beta standalone_firefox_beta + - name: Test the Docker container images + run: | + NAMESPACE=$NAME ./tests/bootstrap.sh NodeChrome + NAMESPACE=$NAME ./tests/bootstrap.sh NodeFirefox +# VERSION=beta NAMESPACE=$NAME ./tests/bootstrap.sh StandaloneChrome + From a40d9d8d2ab34a85fac507da453314503a7575f9 Mon Sep 17 00:00:00 2001 From: James Mortensen Date: Sat, 20 Aug 2022 18:03:14 +0530 Subject: [PATCH 04/26] fix typo --- .github/workflows/update-dev-beta-browser-images.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-dev-beta-browser-images.yml b/.github/workflows/update-dev-beta-browser-images.yml index 495aa5fdb..deec364f0 100644 --- a/.github/workflows/update-dev-beta-browser-images.yml +++ b/.github/workflows/update-dev-beta-browser-images.yml @@ -8,8 +8,8 @@ jobs: build: runs-on: ubuntu-latest - env: | - NAME: selenium + env: + NAME: selenium steps: - uses: actions/checkout@v3 From 23b24362d1c181d23e88d599e4fcfcf6d568ba53 Mon Sep 17 00:00:00 2001 From: James Mortensen Date: Sat, 20 Aug 2022 18:44:54 +0530 Subject: [PATCH 05/26] removed a generate task from Makefile. Scraping selenium version from the Base/Dockerfile. --- .github/workflows/update-dev-beta-browser-images.yml | 8 +++++--- Makefile | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update-dev-beta-browser-images.yml b/.github/workflows/update-dev-beta-browser-images.yml index deec364f0..896a2a537 100644 --- a/.github/workflows/update-dev-beta-browser-images.yml +++ b/.github/workflows/update-dev-beta-browser-images.yml @@ -15,10 +15,12 @@ jobs: - uses: actions/checkout@v3 - name: Build the Dev/Beta Docker container images run: | - make chrome_beta firefox_beta standalone_chrome_beta standalone_firefox_beta + export SELENIUM_VERSION=$(grep selenium-server Base/Dockerfile | sed 's/.*-\([^-]*\)\.jar \\/\1/' | head -n 1) + echo "SELENIUM_VERSION="$SELENIUM_VERSION >> $GITHUB_ENV + VERSION=$SELENIUM_VERSION make chrome_beta firefox_beta standalone_chrome_beta standalone_firefox_beta - name: Test the Docker container images run: | - NAMESPACE=$NAME ./tests/bootstrap.sh NodeChrome - NAMESPACE=$NAME ./tests/bootstrap.sh NodeFirefox + NAMESPACE=$NAME VERSION=$SELENIUM_VERSION ./tests/bootstrap.sh NodeChrome + NAMESPACE=$NAME VERSION=$SELENIUM_VERSION ./tests/bootstrap.sh NodeFirefox # VERSION=beta NAMESPACE=$NAME ./tests/bootstrap.sh StandaloneChrome diff --git a/Makefile b/Makefile index 9df5fc823..9f15f5c5a 100644 --- a/Makefile +++ b/Makefile @@ -70,7 +70,7 @@ edge: node_base firefox: node_base cd ./NodeFirefox && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/node-firefox:$(TAG_VERSION) . -firefox_beta: node_base generate_firefox +firefox_beta: node_base cd ./NodeFirefox && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg FIREFOX_VERSION=beta-latest -t $(NAME)/node-firefox:beta . docker: base From 6fecd919862e6a797e956766b022cc70f8595df1 Mon Sep 17 00:00:00 2001 From: James Mortensen Date: Sat, 20 Aug 2022 20:21:59 +0530 Subject: [PATCH 06/26] Fixed dependency for standalone beta images. Added in edge, including accidentally deleted standalone_edge... --- .../workflows/update-dev-beta-browser-images.yml | 6 +++++- Makefile | 15 ++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update-dev-beta-browser-images.yml b/.github/workflows/update-dev-beta-browser-images.yml index 896a2a537..df9afea1b 100644 --- a/.github/workflows/update-dev-beta-browser-images.yml +++ b/.github/workflows/update-dev-beta-browser-images.yml @@ -17,10 +17,14 @@ jobs: run: | export SELENIUM_VERSION=$(grep selenium-server Base/Dockerfile | sed 's/.*-\([^-]*\)\.jar \\/\1/' | head -n 1) echo "SELENIUM_VERSION="$SELENIUM_VERSION >> $GITHUB_ENV - VERSION=$SELENIUM_VERSION make chrome_beta firefox_beta standalone_chrome_beta standalone_firefox_beta + VERSION=$SELENIUM_VERSION make \ + chrome_beta firefox_beta edge_beta \ + standalone_chrome_beta standalone_firefox_beta standalone_edge_beta + - name: Test the Docker container images run: | NAMESPACE=$NAME VERSION=$SELENIUM_VERSION ./tests/bootstrap.sh NodeChrome NAMESPACE=$NAME VERSION=$SELENIUM_VERSION ./tests/bootstrap.sh NodeFirefox + NAMESPACE=$NAME VERSION=$SELENIUM_VERSION ./tests/bootstrap.sh NodeEdge # VERSION=beta NAMESPACE=$NAME ./tests/bootstrap.sh StandaloneChrome diff --git a/Makefile b/Makefile index 9f15f5c5a..4b246ec48 100644 --- a/Makefile +++ b/Makefile @@ -67,6 +67,9 @@ chrome_beta: node_base edge: node_base cd ./NodeEdge && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/node-edge:$(TAG_VERSION) . +edge_beta: node_base + cd ./NodeEdge && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg EDGE_VERSION=microsoft-edge-beta -t $(NAME)/node-edge:beta . + firefox: node_base cd ./NodeFirefox && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/node-firefox:$(TAG_VERSION) . @@ -82,14 +85,20 @@ standalone_docker: docker standalone_firefox: firefox cd ./Standalone && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg BASE=node-firefox -t $(NAME)/standalone-firefox:$(TAG_VERSION) . -standalone_firefox_beta: firefox +standalone_firefox_beta: firefox_beta cd ./Standalone && docker build $(BUILD_ARGS) --build-arg NAMESPACE=$(NAME) --build-arg VERSION=beta --build-arg BASE=node-firefox -t $(NAME)/standalone-firefox:beta . standalone_chrome: chrome cd ./Standalone && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg BASE=node-chrome -t $(NAME)/standalone-chrome:$(TAG_VERSION) . -standalone_chrome_beta: chrome - cd ./StandaloneChrome && docker build $(BUILD_ARGS) --build-arg NAMESPACE=$(NAME) --build-arg VERSION=beta --build-arg BASE=node-chrome -t $(NAME)/standalone-chrome:beta . +standalone_chrome_beta: chrome_beta + cd ./Standalone && docker build $(BUILD_ARGS) --build-arg NAMESPACE=$(NAME) --build-arg VERSION=beta --build-arg BASE=node-chrome -t $(NAME)/standalone-chrome:beta . + +standalone_edge: edge + cd ./Standalone && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg BASE=node-edge -t $(NAME)/standalone-edge:$(TAG_VERSION) . + +standalone_edge_beta: edge_beta + cd ./Standalone && docker build $(BUILD_ARGS) --build-arg NAMESPACE=$(NAME) --build-arg VERSION=beta --build-arg BASE=node-edge -t $(NAME)/standalone-edge:beta . video: cd ./Video && docker build $(BUILD_ARGS) -t $(NAME)/video:$(FFMPEG_TAG_VERSION)-$(BUILD_DATE) . From 48ac89c16aa79ca3fc627bd0d4c7f1250dce793c Mon Sep 17 00:00:00 2001 From: James Mortensen Date: Sat, 20 Aug 2022 20:50:52 +0530 Subject: [PATCH 07/26] Make sure we're building the beta versions when testing them --- .../workflows/update-dev-beta-browser-images.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/update-dev-beta-browser-images.yml b/.github/workflows/update-dev-beta-browser-images.yml index df9afea1b..a4ea70983 100644 --- a/.github/workflows/update-dev-beta-browser-images.yml +++ b/.github/workflows/update-dev-beta-browser-images.yml @@ -13,18 +13,24 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Build the Dev/Beta Docker container images + - name: Setup environment variables run: | export SELENIUM_VERSION=$(grep selenium-server Base/Dockerfile | sed 's/.*-\([^-]*\)\.jar \\/\1/' | head -n 1) echo "SELENIUM_VERSION="$SELENIUM_VERSION >> $GITHUB_ENV + export BUILD_DATE=$(date '+%Y%m%d') + echo "BUILD_DATE="$BUILD_DATE >> $GITHUB_ENV + + - name: Build the Dev/Beta Docker container images + run: | VERSION=$SELENIUM_VERSION make \ chrome_beta firefox_beta edge_beta \ standalone_chrome_beta standalone_firefox_beta standalone_edge_beta - name: Test the Docker container images run: | - NAMESPACE=$NAME VERSION=$SELENIUM_VERSION ./tests/bootstrap.sh NodeChrome - NAMESPACE=$NAME VERSION=$SELENIUM_VERSION ./tests/bootstrap.sh NodeFirefox - NAMESPACE=$NAME VERSION=$SELENIUM_VERSION ./tests/bootstrap.sh NodeEdge + # Make it easier to build the node beta images by tagging node-base with beta + docker tag $NAME/node-base:$SELENIUM_VERSION-$BUILD_DATE $NAME/node-base:beta + NAMESPACE=$NAME VERSION=beta ./tests/bootstrap.sh NodeChrome + NAMESPACE=$NAME VERSION=beta ./tests/bootstrap.sh NodeFirefox + NAMESPACE=$NAME VERSION=beta ./tests/bootstrap.sh NodeEdge # VERSION=beta NAMESPACE=$NAME ./tests/bootstrap.sh StandaloneChrome - From 7755a6c344b6a40ff3d8aaca01e00f86c483477c Mon Sep 17 00:00:00 2001 From: James Mortensen Date: Sat, 20 Aug 2022 21:10:14 +0530 Subject: [PATCH 08/26] Added edge to makefile, also added support for dev versions of the browsers. Also, retagging node-base and hub as dev/beta to make the testing process easier. --- .../update-dev-beta-browser-images.yml | 32 +++++++++++++++---- Makefile | 18 +++++++++++ 2 files changed, 43 insertions(+), 7 deletions(-) diff --git a/.github/workflows/update-dev-beta-browser-images.yml b/.github/workflows/update-dev-beta-browser-images.yml index a4ea70983..7d95ca609 100644 --- a/.github/workflows/update-dev-beta-browser-images.yml +++ b/.github/workflows/update-dev-beta-browser-images.yml @@ -23,14 +23,32 @@ jobs: - name: Build the Dev/Beta Docker container images run: | VERSION=$SELENIUM_VERSION make \ + chrome_dev firefox_dev edge_dev \ chrome_beta firefox_beta edge_beta \ - standalone_chrome_beta standalone_firefox_beta standalone_edge_beta + standalone_chrome_dev standalone_firefox_dev standalone_edge_dev \ + standalone_chrome_beta standalone_firefox_beta standalone_edge_beta \ + hub - - name: Test the Docker container images + - name: Make it easier to test the node beta images by tagging node-base and hub with beta/dev run: | - # Make it easier to build the node beta images by tagging node-base with beta + docker tag $NAME/node-base:$SELENIUM_VERSION-$BUILD_DATE $NAME/node-base:dev docker tag $NAME/node-base:$SELENIUM_VERSION-$BUILD_DATE $NAME/node-base:beta - NAMESPACE=$NAME VERSION=beta ./tests/bootstrap.sh NodeChrome - NAMESPACE=$NAME VERSION=beta ./tests/bootstrap.sh NodeFirefox - NAMESPACE=$NAME VERSION=beta ./tests/bootstrap.sh NodeEdge -# VERSION=beta NAMESPACE=$NAME ./tests/bootstrap.sh StandaloneChrome + docker tag $NAME/hub:$SELENIUM_VERSION-$BUILD_DATE $NAME/hub:dev + docker tag $NAME/hub:$SELENIUM_VERSION-$BUILD_DATE $NAME/hub:beta + + - name: Test the Dev/Beta Docker container images + run: | + export NAMESPACE=$NAME + VERSION=dev ./tests/bootstrap.sh NodeChrome + VERSION=dev ./tests/bootstrap.sh NodeFirefox + VERSION=dev ./tests/bootstrap.sh NodeEdge + VERSION=beta ./tests/bootstrap.sh NodeChrome + VERSION=beta ./tests/bootstrap.sh NodeFirefox + VERSION=beta ./tests/bootstrap.sh NodeEdge + VERSION=dev ./tests/bootstrap.sh StandaloneChrome + VERSION=dev ./tests/bootstrap.sh StandaloneFirefox + VERSION=dev ./tests/bootstrap.sh StandaloneEdge + VERSION=beta ./tests/bootstrap.sh StandaloneChrome + VERSION=beta ./tests/bootstrap.sh StandaloneFirefox + VERSION=beta ./tests/bootstrap.sh StandaloneEdge + diff --git a/Makefile b/Makefile index 4b246ec48..f6ee76802 100644 --- a/Makefile +++ b/Makefile @@ -61,18 +61,27 @@ node_base: base chrome: node_base cd ./NodeChrome && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/node-chrome:$(TAG_VERSION) . +chrome_dev: node_base + cd ./NodeChrome && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg CHROME_VERSION=google-chrome-dev -t $(NAME)/node-chrome:dev . + chrome_beta: node_base cd ./NodeChrome && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg CHROME_VERSION=google-chrome-beta -t $(NAME)/node-chrome:beta . edge: node_base cd ./NodeEdge && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/node-edge:$(TAG_VERSION) . +edge_dev: node_base + cd ./NodeEdge && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg EDGE_VERSION=microsoft-edge-dev -t $(NAME)/node-edge:dev . + edge_beta: node_base cd ./NodeEdge && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg EDGE_VERSION=microsoft-edge-beta -t $(NAME)/node-edge:beta . firefox: node_base cd ./NodeFirefox && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/node-firefox:$(TAG_VERSION) . +firefox_dev: node_base + cd ./NodeFirefox && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg FIREFOX_VERSION=devedition-latest -t $(NAME)/node-firefox:dev . + firefox_beta: node_base cd ./NodeFirefox && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg FIREFOX_VERSION=beta-latest -t $(NAME)/node-firefox:beta . @@ -85,18 +94,27 @@ standalone_docker: docker standalone_firefox: firefox cd ./Standalone && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg BASE=node-firefox -t $(NAME)/standalone-firefox:$(TAG_VERSION) . +standalone_firefox_dev: firefox_dev + cd ./Standalone && docker build $(BUILD_ARGS) --build-arg NAMESPACE=$(NAME) --build-arg VERSION=dev --build-arg BASE=node-firefox -t $(NAME)/standalone-firefox:dev . + standalone_firefox_beta: firefox_beta cd ./Standalone && docker build $(BUILD_ARGS) --build-arg NAMESPACE=$(NAME) --build-arg VERSION=beta --build-arg BASE=node-firefox -t $(NAME)/standalone-firefox:beta . standalone_chrome: chrome cd ./Standalone && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg BASE=node-chrome -t $(NAME)/standalone-chrome:$(TAG_VERSION) . +standalone_chrome_dev: chrome_dev + cd ./Standalone && docker build $(BUILD_ARGS) --build-arg NAMESPACE=$(NAME) --build-arg VERSION=dev --build-arg BASE=node-chrome -t $(NAME)/standalone-chrome:dev . + standalone_chrome_beta: chrome_beta cd ./Standalone && docker build $(BUILD_ARGS) --build-arg NAMESPACE=$(NAME) --build-arg VERSION=beta --build-arg BASE=node-chrome -t $(NAME)/standalone-chrome:beta . standalone_edge: edge cd ./Standalone && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg BASE=node-edge -t $(NAME)/standalone-edge:$(TAG_VERSION) . +standalone_edge_dev: edge_dev + cd ./Standalone && docker build $(BUILD_ARGS) --build-arg NAMESPACE=$(NAME) --build-arg VERSION=dev --build-arg BASE=node-edge -t $(NAME)/standalone-edge:dev . + standalone_edge_beta: edge_beta cd ./Standalone && docker build $(BUILD_ARGS) --build-arg NAMESPACE=$(NAME) --build-arg VERSION=beta --build-arg BASE=node-edge -t $(NAME)/standalone-edge:beta . From 753cff459d0cec1d56ca2dcfc0ef7ca6e9a1d3af Mon Sep 17 00:00:00 2001 From: James Mortensen Date: Sat, 20 Aug 2022 21:20:41 +0530 Subject: [PATCH 09/26] google chrome dev channel is 'google-chrome-unstable' --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f6ee76802..a3b96f84c 100644 --- a/Makefile +++ b/Makefile @@ -62,7 +62,7 @@ chrome: node_base cd ./NodeChrome && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/node-chrome:$(TAG_VERSION) . chrome_dev: node_base - cd ./NodeChrome && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg CHROME_VERSION=google-chrome-dev -t $(NAME)/node-chrome:dev . + cd ./NodeChrome && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg CHROME_VERSION=google-chrome-unstable -t $(NAME)/node-chrome:dev . chrome_beta: node_base cd ./NodeChrome && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg CHROME_VERSION=google-chrome-beta -t $(NAME)/node-chrome:beta . From 6bd5f85f78ca0e400847afdeb70530dec9029c1a Mon Sep 17 00:00:00 2001 From: James Mortensen Date: Sun, 21 Aug 2022 12:23:38 +0530 Subject: [PATCH 10/26] Modified NodeChrome Dockerfile to try back one more chromedriver version if the one for dev is not available. Also, added matrix strategy with fail-fast false to build, test, and deploy whatever platforms pass testing. --- .../update-dev-beta-browser-images.yml | 49 +++++++++---------- NodeChrome/Dockerfile | 8 ++- 2 files changed, 31 insertions(+), 26 deletions(-) diff --git a/.github/workflows/update-dev-beta-browser-images.yml b/.github/workflows/update-dev-beta-browser-images.yml index 7d95ca609..23da01781 100644 --- a/.github/workflows/update-dev-beta-browser-images.yml +++ b/.github/workflows/update-dev-beta-browser-images.yml @@ -8,6 +8,11 @@ jobs: build: runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + browser: [chrome,firefox,edge] + channel: [dev,beta] env: NAME: selenium @@ -19,36 +24,30 @@ jobs: echo "SELENIUM_VERSION="$SELENIUM_VERSION >> $GITHUB_ENV export BUILD_DATE=$(date '+%Y%m%d') echo "BUILD_DATE="$BUILD_DATE >> $GITHUB_ENV + + - name: Temporarily pull node-base as it is faster + run: | + docker pull $NAME/node-base:latest + docker tag $NAME/node-base:latest $NAME/node-base:$CHANNEL + docker tag $NAME/node-base:latest $NAME/node-base:$CHANNEL - name: Build the Dev/Beta Docker container images + env: + BROWSER: ${{ matrix.browser }} + CHANNEL: ${{ matrix.channel }} run: | - VERSION=$SELENIUM_VERSION make \ - chrome_dev firefox_dev edge_dev \ - chrome_beta firefox_beta edge_beta \ - standalone_chrome_dev standalone_firefox_dev standalone_edge_dev \ - standalone_chrome_beta standalone_firefox_beta standalone_edge_beta \ - hub - - - name: Make it easier to test the node beta images by tagging node-base and hub with beta/dev + VERSION=$SELENIUM_VERSION make hub $BROWSER_$CHANNEL standalone_$BROWSER_$CHANNEL + # Need to check for an older Chromedriver by 1 major version vefore failing. + + - name: Make it easier to test the node dev/beta images by tagging node-base and hub with dev/beta run: | - docker tag $NAME/node-base:$SELENIUM_VERSION-$BUILD_DATE $NAME/node-base:dev - docker tag $NAME/node-base:$SELENIUM_VERSION-$BUILD_DATE $NAME/node-base:beta - docker tag $NAME/hub:$SELENIUM_VERSION-$BUILD_DATE $NAME/hub:dev - docker tag $NAME/hub:$SELENIUM_VERSION-$BUILD_DATE $NAME/hub:beta + docker tag $NAME/node-base:$SELENIUM_VERSION-$BUILD_DATE $NAME/node-base:$CHANNEL + docker tag $NAME/hub:$SELENIUM_VERSION-$BUILD_DATE $NAME/hub:$CHANNEL - name: Test the Dev/Beta Docker container images run: | export NAMESPACE=$NAME - VERSION=dev ./tests/bootstrap.sh NodeChrome - VERSION=dev ./tests/bootstrap.sh NodeFirefox - VERSION=dev ./tests/bootstrap.sh NodeEdge - VERSION=beta ./tests/bootstrap.sh NodeChrome - VERSION=beta ./tests/bootstrap.sh NodeFirefox - VERSION=beta ./tests/bootstrap.sh NodeEdge - VERSION=dev ./tests/bootstrap.sh StandaloneChrome - VERSION=dev ./tests/bootstrap.sh StandaloneFirefox - VERSION=dev ./tests/bootstrap.sh StandaloneEdge - VERSION=beta ./tests/bootstrap.sh StandaloneChrome - VERSION=beta ./tests/bootstrap.sh StandaloneFirefox - VERSION=beta ./tests/bootstrap.sh StandaloneEdge - + $BROWSER_CAPS=`node -p "process.argv[1][0].toUpperCase() + process.argv[1].toString().substring(1)"` $BROWSER + VERSION=$CHANNEL ./tests/bootstrap.sh Node$BROWSER_CAPS + VERSION=$CHANNEL ./tests/bootstrap.sh Standalone$BROWSER_CAPS + \ No newline at end of file diff --git a/NodeChrome/Dockerfile b/NodeChrome/Dockerfile index aaaffcc2f..9c2299932 100644 --- a/NodeChrome/Dockerfile +++ b/NodeChrome/Dockerfile @@ -42,7 +42,13 @@ USER 1200 ARG CHROME_DRIVER_VERSION RUN if [ -z "$CHROME_DRIVER_VERSION" ]; \ then CHROME_MAJOR_VERSION=$(google-chrome --version | sed -E "s/.* ([0-9]+)(\.[0-9]+){3}.*/\1/") \ - && CHROME_DRIVER_VERSION=$(wget --no-verbose -O - "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROME_MAJOR_VERSION}"); \ + && NO_SUCH_KEY=`curl -ls https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROME_MAJOR_VERSION} | head -n 1 | grep -oe NoSuchKey` \ + && if [ -z "$NO_SUCH_KEY" ]; then \ + && CHROME_DRIVER_VERSION=$(wget --no-verbose -O - "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROME_MAJOR_VERSION}"); \ + else \ + && echo "No Chromedriver for version $CHROME_DRIVER_VERSION. Use previous major version instead" \ + && CHROME_DRIVER_VERSION=$(expr $CHROME_MAJOR_VERSION - 1); \ + fi \ fi \ && echo "Using chromedriver version: "$CHROME_DRIVER_VERSION \ && wget --no-verbose -O /tmp/chromedriver_linux64.zip https://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip \ From e774c6488134a3683874b5628461d3c8b18f3097 Mon Sep 17 00:00:00 2001 From: James Mortensen Date: Sun, 21 Aug 2022 12:26:26 +0530 Subject: [PATCH 11/26] Move matrix environment variables from step to job --- .github/workflows/update-dev-beta-browser-images.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update-dev-beta-browser-images.yml b/.github/workflows/update-dev-beta-browser-images.yml index 23da01781..e821863cb 100644 --- a/.github/workflows/update-dev-beta-browser-images.yml +++ b/.github/workflows/update-dev-beta-browser-images.yml @@ -15,6 +15,8 @@ jobs: channel: [dev,beta] env: NAME: selenium + BROWSER: ${{ matrix.browser }} + CHANNEL: ${{ matrix.channel }} steps: - uses: actions/checkout@v3 @@ -32,9 +34,6 @@ jobs: docker tag $NAME/node-base:latest $NAME/node-base:$CHANNEL - name: Build the Dev/Beta Docker container images - env: - BROWSER: ${{ matrix.browser }} - CHANNEL: ${{ matrix.channel }} run: | VERSION=$SELENIUM_VERSION make hub $BROWSER_$CHANNEL standalone_$BROWSER_$CHANNEL # Need to check for an older Chromedriver by 1 major version vefore failing. From ac3ae7364dea439e731a3277a56a6d38ee93ec51 Mon Sep 17 00:00:00 2001 From: James Mortensen Date: Sun, 21 Aug 2022 12:30:22 +0530 Subject: [PATCH 12/26] try again --- .github/workflows/update-dev-beta-browser-images.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/update-dev-beta-browser-images.yml b/.github/workflows/update-dev-beta-browser-images.yml index e821863cb..927e4bf39 100644 --- a/.github/workflows/update-dev-beta-browser-images.yml +++ b/.github/workflows/update-dev-beta-browser-images.yml @@ -26,6 +26,8 @@ jobs: echo "SELENIUM_VERSION="$SELENIUM_VERSION >> $GITHUB_ENV export BUILD_DATE=$(date '+%Y%m%d') echo "BUILD_DATE="$BUILD_DATE >> $GITHUB_ENV + echo "BROWSER is $BROWSER" + echo "CHANNEL is $CHANNEL" - name: Temporarily pull node-base as it is faster run: | From 88bce17215ca8318cebf76aed94e6ec437d8705c Mon Sep 17 00:00:00 2001 From: James Mortensen Date: Sun, 21 Aug 2022 12:36:18 +0530 Subject: [PATCH 13/26] debug why it is failing --- .github/workflows/update-dev-beta-browser-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-dev-beta-browser-images.yml b/.github/workflows/update-dev-beta-browser-images.yml index 927e4bf39..a7a97120d 100644 --- a/.github/workflows/update-dev-beta-browser-images.yml +++ b/.github/workflows/update-dev-beta-browser-images.yml @@ -37,8 +37,8 @@ jobs: - name: Build the Dev/Beta Docker container images run: | + echo "VERSION=$SELENIUM_VERSION make hub $BROWSER_$CHANNEL standalone_$BROWSER_$CHANNEL" VERSION=$SELENIUM_VERSION make hub $BROWSER_$CHANNEL standalone_$BROWSER_$CHANNEL - # Need to check for an older Chromedriver by 1 major version vefore failing. - name: Make it easier to test the node dev/beta images by tagging node-base and hub with dev/beta run: | From 0bb43b7a78db2792de7718748b09d0da2cfa5430 Mon Sep 17 00:00:00 2001 From: James Mortensen Date: Sun, 21 Aug 2022 12:41:16 +0530 Subject: [PATCH 14/26] Fix typo --- .github/workflows/update-dev-beta-browser-images.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-dev-beta-browser-images.yml b/.github/workflows/update-dev-beta-browser-images.yml index a7a97120d..f28b22a56 100644 --- a/.github/workflows/update-dev-beta-browser-images.yml +++ b/.github/workflows/update-dev-beta-browser-images.yml @@ -37,8 +37,8 @@ jobs: - name: Build the Dev/Beta Docker container images run: | - echo "VERSION=$SELENIUM_VERSION make hub $BROWSER_$CHANNEL standalone_$BROWSER_$CHANNEL" - VERSION=$SELENIUM_VERSION make hub $BROWSER_$CHANNEL standalone_$BROWSER_$CHANNEL + echo VERSION=$SELENIUM_VERSION make hub $BROWSER_$CHANNEL standalone_"$BROWSER"_"$CHANNEL" + VERSION=$SELENIUM_VERSION make hub "$BROWSER"_"$CHANNEL" standalone_"$BROWSER"_"$CHANNEL" - name: Make it easier to test the node dev/beta images by tagging node-base and hub with dev/beta run: | From a787a9734b2e6944e2776dd5007d48059bc8386e Mon Sep 17 00:00:00 2001 From: James Mortensen Date: Sun, 21 Aug 2022 12:49:18 +0530 Subject: [PATCH 15/26] fix typo --- .github/workflows/update-dev-beta-browser-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-dev-beta-browser-images.yml b/.github/workflows/update-dev-beta-browser-images.yml index f28b22a56..292d7a49f 100644 --- a/.github/workflows/update-dev-beta-browser-images.yml +++ b/.github/workflows/update-dev-beta-browser-images.yml @@ -48,7 +48,7 @@ jobs: - name: Test the Dev/Beta Docker container images run: | export NAMESPACE=$NAME - $BROWSER_CAPS=`node -p "process.argv[1][0].toUpperCase() + process.argv[1].toString().substring(1)"` $BROWSER + $BROWSER_CAPS=`node -p "process.argv[1][0].toUpperCase() + process.argv[1].toString().substring(1)" $BROWSER` VERSION=$CHANNEL ./tests/bootstrap.sh Node$BROWSER_CAPS VERSION=$CHANNEL ./tests/bootstrap.sh Standalone$BROWSER_CAPS \ No newline at end of file From 23c7109498ff8fe7c3cf09b9a2f04775a006cf4d Mon Sep 17 00:00:00 2001 From: James Mortensen Date: Sun, 21 Aug 2022 15:24:03 +0530 Subject: [PATCH 16/26] fix typo --- .github/workflows/update-dev-beta-browser-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-dev-beta-browser-images.yml b/.github/workflows/update-dev-beta-browser-images.yml index 292d7a49f..6fb3172e3 100644 --- a/.github/workflows/update-dev-beta-browser-images.yml +++ b/.github/workflows/update-dev-beta-browser-images.yml @@ -48,7 +48,7 @@ jobs: - name: Test the Dev/Beta Docker container images run: | export NAMESPACE=$NAME - $BROWSER_CAPS=`node -p "process.argv[1][0].toUpperCase() + process.argv[1].toString().substring(1)" $BROWSER` + export BROWSER_CAPS=`node -p "process.argv[1][0].toUpperCase() + process.argv[1].toString().substring(1)" $BROWSER` VERSION=$CHANNEL ./tests/bootstrap.sh Node$BROWSER_CAPS VERSION=$CHANNEL ./tests/bootstrap.sh Standalone$BROWSER_CAPS \ No newline at end of file From 4bfd4df8eddccb8c407a36acacffd5a35c3a82f6 Mon Sep 17 00:00:00 2001 From: James Mortensen Date: Sun, 21 Aug 2022 15:32:06 +0530 Subject: [PATCH 17/26] tag base with channel name as well --- .github/workflows/update-dev-beta-browser-images.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update-dev-beta-browser-images.yml b/.github/workflows/update-dev-beta-browser-images.yml index 6fb3172e3..fac4ccae1 100644 --- a/.github/workflows/update-dev-beta-browser-images.yml +++ b/.github/workflows/update-dev-beta-browser-images.yml @@ -40,11 +40,12 @@ jobs: echo VERSION=$SELENIUM_VERSION make hub $BROWSER_$CHANNEL standalone_"$BROWSER"_"$CHANNEL" VERSION=$SELENIUM_VERSION make hub "$BROWSER"_"$CHANNEL" standalone_"$BROWSER"_"$CHANNEL" - - name: Make it easier to test the node dev/beta images by tagging node-base and hub with dev/beta + - name: Make it easier to test the node dev/beta images by tagging base, node-base and hub with dev/beta run: | - docker tag $NAME/node-base:$SELENIUM_VERSION-$BUILD_DATE $NAME/node-base:$CHANNEL + docker tag $NAME/hub:$SELENIUM_VERSION-$BUILD_DATE $NAME/base:$CHANNEL docker tag $NAME/hub:$SELENIUM_VERSION-$BUILD_DATE $NAME/hub:$CHANNEL - + docker tag $NAME/node-base:$SELENIUM_VERSION-$BUILD_DATE $NAME/node-base:$CHANNEL + - name: Test the Dev/Beta Docker container images run: | export NAMESPACE=$NAME From aa11c1616b5d20c336095dbf869cd5c2435c2e73 Mon Sep 17 00:00:00 2001 From: James Mortensen Date: Sun, 21 Aug 2022 18:22:15 +0530 Subject: [PATCH 18/26] Fix typo --- NodeChrome/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NodeChrome/Dockerfile b/NodeChrome/Dockerfile index 9c2299932..a9ca44b69 100644 --- a/NodeChrome/Dockerfile +++ b/NodeChrome/Dockerfile @@ -44,9 +44,9 @@ RUN if [ -z "$CHROME_DRIVER_VERSION" ]; \ then CHROME_MAJOR_VERSION=$(google-chrome --version | sed -E "s/.* ([0-9]+)(\.[0-9]+){3}.*/\1/") \ && NO_SUCH_KEY=`curl -ls https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROME_MAJOR_VERSION} | head -n 1 | grep -oe NoSuchKey` \ && if [ -z "$NO_SUCH_KEY" ]; then \ - && CHROME_DRIVER_VERSION=$(wget --no-verbose -O - "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROME_MAJOR_VERSION}"); \ + CHROME_DRIVER_VERSION=$(wget --no-verbose -O - "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROME_MAJOR_VERSION}"); \ else \ - && echo "No Chromedriver for version $CHROME_DRIVER_VERSION. Use previous major version instead" \ + echo "No Chromedriver for version $CHROME_DRIVER_VERSION. Use previous major version instead" \ && CHROME_DRIVER_VERSION=$(expr $CHROME_MAJOR_VERSION - 1); \ fi \ fi \ From 2a1b783750dfabe314546c67fecf77f3517432f7 Mon Sep 17 00:00:00 2001 From: James Mortensen Date: Sun, 21 Aug 2022 19:35:04 +0530 Subject: [PATCH 19/26] If dev chromedriver is not available, try with the one previous - fixing the logic on this --- NodeChrome/Dockerfile | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/NodeChrome/Dockerfile b/NodeChrome/Dockerfile index a9ca44b69..79d4423e3 100644 --- a/NodeChrome/Dockerfile +++ b/NodeChrome/Dockerfile @@ -42,13 +42,12 @@ USER 1200 ARG CHROME_DRIVER_VERSION RUN if [ -z "$CHROME_DRIVER_VERSION" ]; \ then CHROME_MAJOR_VERSION=$(google-chrome --version | sed -E "s/.* ([0-9]+)(\.[0-9]+){3}.*/\1/") \ - && NO_SUCH_KEY=`curl -ls https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROME_MAJOR_VERSION} | head -n 1 | grep -oe NoSuchKey` \ - && if [ -z "$NO_SUCH_KEY" ]; then \ - CHROME_DRIVER_VERSION=$(wget --no-verbose -O - "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROME_MAJOR_VERSION}"); \ - else \ - echo "No Chromedriver for version $CHROME_DRIVER_VERSION. Use previous major version instead" \ - && CHROME_DRIVER_VERSION=$(expr $CHROME_MAJOR_VERSION - 1); \ - fi \ + && NO_SUCH_KEY=$(curl -ls https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROME_MAJOR_VERSION} | head -n 1 | grep -oe NoSuchKey) ; \ + if [ -n "$NO_SUCH_KEY" ]; then \ + echo "No Chromedriver for version $CHROME_MAJOR_VERSION. Use previous major version instead" \ + && CHROME_MAJOR_VERSION=$(expr $CHROME_MAJOR_VERSION - 1); \ + fi ; \ + CHROME_DRIVER_VERSION=$(wget --no-verbose -O - "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROME_MAJOR_VERSION}"); \ fi \ && echo "Using chromedriver version: "$CHROME_DRIVER_VERSION \ && wget --no-verbose -O /tmp/chromedriver_linux64.zip https://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip \ From f2defc749f7ba3e3fdbf885a4373f2e06006325a Mon Sep 17 00:00:00 2001 From: James Mortensen Date: Sun, 21 Aug 2022 19:51:12 +0530 Subject: [PATCH 20/26] Successful build, but I think the non-dev images are being built prior to testing, so adding SKIP_BUILD argument from seleniarm repo. Adding deploy steps. --- .../update-dev-beta-browser-images.yml | 15 ++++++++++-- tests/test.py | 23 +++++++++++-------- 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/.github/workflows/update-dev-beta-browser-images.yml b/.github/workflows/update-dev-beta-browser-images.yml index fac4ccae1..ad88d2db2 100644 --- a/.github/workflows/update-dev-beta-browser-images.yml +++ b/.github/workflows/update-dev-beta-browser-images.yml @@ -14,7 +14,7 @@ jobs: browser: [chrome,firefox,edge] channel: [dev,beta] env: - NAME: selenium + NAME: jamesmortensen1 BROWSER: ${{ matrix.browser }} CHANNEL: ${{ matrix.channel }} @@ -48,8 +48,19 @@ jobs: - name: Test the Dev/Beta Docker container images run: | + export SKIP_BUILD=true export NAMESPACE=$NAME export BROWSER_CAPS=`node -p "process.argv[1][0].toUpperCase() + process.argv[1].toString().substring(1)" $BROWSER` VERSION=$CHANNEL ./tests/bootstrap.sh Node$BROWSER_CAPS VERSION=$CHANNEL ./tests/bootstrap.sh Standalone$BROWSER_CAPS - \ No newline at end of file + + - name: Login Docker Hub + run: docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" + env: + DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} + DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} + + - name: Deploy Dev/Beta Docker container images + run: | + docker push $NAME/node-$BROWSER:$CHANNEL + docker push $NAME/standalone-$BROWSER:$CHANNEL diff --git a/tests/test.py b/tests/test.py index b9540b22d..d15e2899c 100644 --- a/tests/test.py +++ b/tests/test.py @@ -22,6 +22,7 @@ http_proxy = os.environ.get('http_proxy', '') https_proxy = os.environ.get('https_proxy', '') no_proxy = os.environ.get('no_proxy', '') +SKIP_BUILD = os.environ.get('SKIP_BUILD', False) IMAGE_NAME_MAP = { # Hub @@ -108,15 +109,19 @@ def launch_container(container, **kwargs): :param container: :return: the container ID """ - # Build the container if it doesn't exist - logger.info("Building %s container..." % container) - set_from_image_base_for_standalone(container) - build_path = get_build_path(container) - client.images.build(path='../%s' % build_path, - tag="%s/%s:%s" % (NAMESPACE, IMAGE_NAME_MAP[container], VERSION), - rm=True, - buildargs=FROM_IMAGE_ARGS) - logger.info("Done building %s" % container) + skip_building_images = SKIP_BUILD == 'true' + if skip_building_images: + logger.info("SKIP_BUILD is true...not rebuilding images...") + else: + # Build the container if it doesn't exist + logger.info("Building %s container..." % container) + set_from_image_base_for_standalone(container) + build_path = get_build_path(container) + client.images.build(path='../%s' % build_path, + tag="%s/%s:%s" % (NAMESPACE, IMAGE_NAME_MAP[container], VERSION), + rm=True, + buildargs=FROM_IMAGE_ARGS) + logger.info("Done building %s" % container) # Run the container logger.info("Running %s container..." % container) From 39b3280a52956449d5364ac6ac74150a8289f8ba Mon Sep 17 00:00:00 2001 From: James Mortensen Date: Mon, 22 Aug 2022 08:59:47 +0530 Subject: [PATCH 21/26] tag node-base and hub and pull from docker hub for faster building and testing. Output browser and driver versions in the logs --- .../update-dev-beta-browser-images.yml | 36 ++++++++++++++----- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/.github/workflows/update-dev-beta-browser-images.yml b/.github/workflows/update-dev-beta-browser-images.yml index ad88d2db2..4ae769996 100644 --- a/.github/workflows/update-dev-beta-browser-images.yml +++ b/.github/workflows/update-dev-beta-browser-images.yml @@ -29,22 +29,25 @@ jobs: echo "BROWSER is $BROWSER" echo "CHANNEL is $CHANNEL" - - name: Temporarily pull node-base as it is faster + - name: Pull hub and node-base and tag them for faster building and testing run: | + docker pull $NAME/hub:latest docker pull $NAME/node-base:latest + docker tag $NAME/hub:latest $NAME/hub:$CHANNEL docker tag $NAME/node-base:latest $NAME/node-base:$CHANNEL - docker tag $NAME/node-base:latest $NAME/node-base:$CHANNEL + docker tag $NAME/hub:latest $NAME/hub:"$SELENIUM_VERSION"-"$BUILD_DATE" + docker tag $NAME/node-base:latest $NAME/node-base:"$SELENIUM_VERSION"-"$BUILD_DATE" - name: Build the Dev/Beta Docker container images run: | - echo VERSION=$SELENIUM_VERSION make hub $BROWSER_$CHANNEL standalone_"$BROWSER"_"$CHANNEL" - VERSION=$SELENIUM_VERSION make hub "$BROWSER"_"$CHANNEL" standalone_"$BROWSER"_"$CHANNEL" + echo VERSION=$SELENIUM_VERSION make $BROWSER_$CHANNEL standalone_"$BROWSER"_"$CHANNEL" + VERSION=$SELENIUM_VERSION make "$BROWSER"_"$CHANNEL" standalone_"$BROWSER"_"$CHANNEL" - - name: Make it easier to test the node dev/beta images by tagging base, node-base and hub with dev/beta - run: | - docker tag $NAME/hub:$SELENIUM_VERSION-$BUILD_DATE $NAME/base:$CHANNEL - docker tag $NAME/hub:$SELENIUM_VERSION-$BUILD_DATE $NAME/hub:$CHANNEL - docker tag $NAME/node-base:$SELENIUM_VERSION-$BUILD_DATE $NAME/node-base:$CHANNEL + # - name: Make it easier to test the node dev/beta images by tagging base, node-base and hub with dev/beta + # run: | + # # docker tag $NAME/hub:$SELENIUM_VERSION-$BUILD_DATE $NAME/base:$CHANNEL + # # docker tag $NAME/hub:$SELENIUM_VERSION-$BUILD_DATE $NAME/hub:$CHANNEL + # # docker tag $NAME/node-base:$SELENIUM_VERSION-$BUILD_DATE $NAME/node-base:$CHANNEL - name: Test the Dev/Beta Docker container images run: | @@ -64,3 +67,18 @@ jobs: run: | docker push $NAME/node-$BROWSER:$CHANNEL docker push $NAME/standalone-$BROWSER:$CHANNEL + if [ "$BROWSER" = "firefox" ]; then + export DRIVER_VERSION_COMMAND="/usr/bin/geckodriver --version" + export BROWSER_VERSION_COMMAND="firefox -version" + elif [ "$BROWSER" = "chrome" ]; then + export DRIVER_VERSION_COMMAND="/usr/bin/chromedriver -version" + export BROWSER_VERSION_COMMAND="google-chrome -version" + elif [ "$BROWSER" = "edge" ]; then + export DRIVER_VERSION_COMMAND="/usr/bin/msedgedriver -version" + export BROWSER_VERSION_COMMAND="microsoft-edge -version" + fi + echo "Push to Docker Hub completed" + echo "$BROWSER $CHANNEL version:" + docker run --rm $NAME/standalone-$BROWSER:$CHANNEL bash -c "$BROWSER_VERSION_COMMAND" + echo "$BROWSER $CHANNEL WebDriver version:" + docker run --rm $NAME/standalone-$BROWSER:$CHANNEL bash -c "$DRIVER_VERSION_COMMAND" From 0964198a1c6362329e5cdfd437a32c7726e374b8 Mon Sep 17 00:00:00 2001 From: James Mortensen Date: Mon, 22 Aug 2022 09:49:46 +0530 Subject: [PATCH 22/26] Eliminate rebuilding the images by removing the Makefile node_base dependency. --- .github/workflows/update-dev-beta-browser-images.yml | 4 +++- Makefile | 12 ++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/update-dev-beta-browser-images.yml b/.github/workflows/update-dev-beta-browser-images.yml index 4ae769996..8a02b3ce0 100644 --- a/.github/workflows/update-dev-beta-browser-images.yml +++ b/.github/workflows/update-dev-beta-browser-images.yml @@ -28,6 +28,8 @@ jobs: echo "BUILD_DATE="$BUILD_DATE >> $GITHUB_ENV echo "BROWSER is $BROWSER" echo "CHANNEL is $CHANNEL" + echo "SELENIUM_VERSION is $SELENIUM_VERSION" + echo "BUILD_DATE is $BUILD_DATE" - name: Pull hub and node-base and tag them for faster building and testing run: | @@ -41,7 +43,7 @@ jobs: - name: Build the Dev/Beta Docker container images run: | echo VERSION=$SELENIUM_VERSION make $BROWSER_$CHANNEL standalone_"$BROWSER"_"$CHANNEL" - VERSION=$SELENIUM_VERSION make "$BROWSER"_"$CHANNEL" standalone_"$BROWSER"_"$CHANNEL" + VERSION=$SELENIUM_VERSION make "$BROWSER"_"$CHANNEL" standalone_"$BROWSER"_"$CHANNEL" # - name: Make it easier to test the node dev/beta images by tagging base, node-base and hub with dev/beta # run: | diff --git a/Makefile b/Makefile index a3b96f84c..315c4dc95 100644 --- a/Makefile +++ b/Makefile @@ -61,28 +61,28 @@ node_base: base chrome: node_base cd ./NodeChrome && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/node-chrome:$(TAG_VERSION) . -chrome_dev: node_base +chrome_dev: cd ./NodeChrome && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg CHROME_VERSION=google-chrome-unstable -t $(NAME)/node-chrome:dev . -chrome_beta: node_base +chrome_beta: cd ./NodeChrome && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg CHROME_VERSION=google-chrome-beta -t $(NAME)/node-chrome:beta . edge: node_base cd ./NodeEdge && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/node-edge:$(TAG_VERSION) . -edge_dev: node_base +edge_dev: cd ./NodeEdge && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg EDGE_VERSION=microsoft-edge-dev -t $(NAME)/node-edge:dev . -edge_beta: node_base +edge_beta: cd ./NodeEdge && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg EDGE_VERSION=microsoft-edge-beta -t $(NAME)/node-edge:beta . firefox: node_base cd ./NodeFirefox && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/node-firefox:$(TAG_VERSION) . -firefox_dev: node_base +firefox_dev: cd ./NodeFirefox && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg FIREFOX_VERSION=devedition-latest -t $(NAME)/node-firefox:dev . -firefox_beta: node_base +firefox_beta: cd ./NodeFirefox && docker build $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg FIREFOX_VERSION=beta-latest -t $(NAME)/node-firefox:beta . docker: base From fb48cd36e6580ad02ed92cb9f1a22db81c191383 Mon Sep 17 00:00:00 2001 From: James Mortensen Date: Mon, 22 Aug 2022 10:04:13 +0530 Subject: [PATCH 23/26] Removed unneeded steps and replace NAME with 'selenium' --- .github/workflows/update-dev-beta-browser-images.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/update-dev-beta-browser-images.yml b/.github/workflows/update-dev-beta-browser-images.yml index 8a02b3ce0..3a4bfcb32 100644 --- a/.github/workflows/update-dev-beta-browser-images.yml +++ b/.github/workflows/update-dev-beta-browser-images.yml @@ -14,7 +14,7 @@ jobs: browser: [chrome,firefox,edge] channel: [dev,beta] env: - NAME: jamesmortensen1 + NAME: selenium BROWSER: ${{ matrix.browser }} CHANNEL: ${{ matrix.channel }} @@ -45,12 +45,6 @@ jobs: echo VERSION=$SELENIUM_VERSION make $BROWSER_$CHANNEL standalone_"$BROWSER"_"$CHANNEL" VERSION=$SELENIUM_VERSION make "$BROWSER"_"$CHANNEL" standalone_"$BROWSER"_"$CHANNEL" - # - name: Make it easier to test the node dev/beta images by tagging base, node-base and hub with dev/beta - # run: | - # # docker tag $NAME/hub:$SELENIUM_VERSION-$BUILD_DATE $NAME/base:$CHANNEL - # # docker tag $NAME/hub:$SELENIUM_VERSION-$BUILD_DATE $NAME/hub:$CHANNEL - # # docker tag $NAME/node-base:$SELENIUM_VERSION-$BUILD_DATE $NAME/node-base:$CHANNEL - - name: Test the Dev/Beta Docker container images run: | export SKIP_BUILD=true From a772b4313f0fa5d3e2cb7183d181ccee46e7b1c7 Mon Sep 17 00:00:00 2001 From: James Mortensen Date: Mon, 22 Aug 2022 10:16:49 +0530 Subject: [PATCH 24/26] Fix note capitalization at the end. Added schedule cron to trigger every 2 days. --- .../workflows/update-dev-beta-browser-images.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/update-dev-beta-browser-images.yml b/.github/workflows/update-dev-beta-browser-images.yml index 3a4bfcb32..f86ef4533 100644 --- a/.github/workflows/update-dev-beta-browser-images.yml +++ b/.github/workflows/update-dev-beta-browser-images.yml @@ -2,10 +2,13 @@ name: Update Dev/Beta Browser Images on: workflow_dispatch: + schedule: + # Trigger build every 2 days + - cron: '0 2 */2 * *' jobs: - build: + deploy: runs-on: ubuntu-latest strategy: @@ -14,7 +17,7 @@ jobs: browser: [chrome,firefox,edge] channel: [dev,beta] env: - NAME: selenium + NAME: jamesmortensen1 BROWSER: ${{ matrix.browser }} CHANNEL: ${{ matrix.channel }} @@ -26,6 +29,10 @@ jobs: echo "SELENIUM_VERSION="$SELENIUM_VERSION >> $GITHUB_ENV export BUILD_DATE=$(date '+%Y%m%d') echo "BUILD_DATE="$BUILD_DATE >> $GITHUB_ENV + export BROWSER_CAPS=`node -p "process.argv[1][0].toUpperCase() + process.argv[1].toString().substring(1)" $BROWSER` + echo "BROWSER_CAPS="$BROWSER_CAPS >> $GITHUB_ENV + export CHANNEL_CAPS=`node -p "process.argv[1][0].toUpperCase() + process.argv[1].toString().substring(1)" $CHANNEL` + echo "CHANNEL_CAPS="$CHANNEL_CAPS >> $GITHUB_ENV echo "BROWSER is $BROWSER" echo "CHANNEL is $CHANNEL" echo "SELENIUM_VERSION is $SELENIUM_VERSION" @@ -49,7 +56,6 @@ jobs: run: | export SKIP_BUILD=true export NAMESPACE=$NAME - export BROWSER_CAPS=`node -p "process.argv[1][0].toUpperCase() + process.argv[1].toString().substring(1)" $BROWSER` VERSION=$CHANNEL ./tests/bootstrap.sh Node$BROWSER_CAPS VERSION=$CHANNEL ./tests/bootstrap.sh Standalone$BROWSER_CAPS @@ -74,7 +80,7 @@ jobs: export BROWSER_VERSION_COMMAND="microsoft-edge -version" fi echo "Push to Docker Hub completed" - echo "$BROWSER $CHANNEL version:" + echo "$BROWSER_CAPS $CHANNEL_CAPS browser version:" docker run --rm $NAME/standalone-$BROWSER:$CHANNEL bash -c "$BROWSER_VERSION_COMMAND" - echo "$BROWSER $CHANNEL WebDriver version:" + echo "$BROWSER_CAPS $CHANNEL_CAPS WebDriver version:" docker run --rm $NAME/standalone-$BROWSER:$CHANNEL bash -c "$DRIVER_VERSION_COMMAND" From 59a15d241a19b0251f6de6e994d024637437fc57 Mon Sep 17 00:00:00 2001 From: James Mortensen Date: Mon, 22 Aug 2022 10:32:15 +0530 Subject: [PATCH 25/26] only geckodriver version needs to be displayed --- .github/workflows/update-dev-beta-browser-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-dev-beta-browser-images.yml b/.github/workflows/update-dev-beta-browser-images.yml index f86ef4533..ae24f9c06 100644 --- a/.github/workflows/update-dev-beta-browser-images.yml +++ b/.github/workflows/update-dev-beta-browser-images.yml @@ -70,7 +70,7 @@ jobs: docker push $NAME/node-$BROWSER:$CHANNEL docker push $NAME/standalone-$BROWSER:$CHANNEL if [ "$BROWSER" = "firefox" ]; then - export DRIVER_VERSION_COMMAND="/usr/bin/geckodriver --version" + export DRIVER_VERSION_COMMAND="/usr/bin/geckodriver --version | head -n 1" export BROWSER_VERSION_COMMAND="firefox -version" elif [ "$BROWSER" = "chrome" ]; then export DRIVER_VERSION_COMMAND="/usr/bin/chromedriver -version" From 2580228d29ea276525ee5d7bbcc583a834381292 Mon Sep 17 00:00:00 2001 From: James Mortensen Date: Mon, 22 Aug 2022 10:42:22 +0530 Subject: [PATCH 26/26] change namespace to selenium and remove workflow dispatch --- .github/workflows/update-dev-beta-browser-images.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/update-dev-beta-browser-images.yml b/.github/workflows/update-dev-beta-browser-images.yml index ae24f9c06..db9d51204 100644 --- a/.github/workflows/update-dev-beta-browser-images.yml +++ b/.github/workflows/update-dev-beta-browser-images.yml @@ -1,7 +1,6 @@ name: Update Dev/Beta Browser Images on: - workflow_dispatch: schedule: # Trigger build every 2 days - cron: '0 2 */2 * *' @@ -17,7 +16,7 @@ jobs: browser: [chrome,firefox,edge] channel: [dev,beta] env: - NAME: jamesmortensen1 + NAME: selenium BROWSER: ${{ matrix.browser }} CHANNEL: ${{ matrix.channel }}