Skip to content

Commit 1ba75e5

Browse files
committed
Docker: Switch supply chain to get backward Chrome versions deb binary
[skip ci] Signed-off-by: Viet Nguyen Duc <[email protected]>
1 parent 8771194 commit 1ba75e5

File tree

7 files changed

+28
-17
lines changed

7 files changed

+28
-17
lines changed

.github/workflows/release-chrome-versions.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
timeout_minutes: 10
7979
max_attempts: 3
8080
command: |
81-
make setup_dev_env
81+
INSTALL_DOCKER=false make setup_dev_env
8282
- name: Output Docker info
8383
run: docker info
8484
- name: Set Selenium base version
@@ -121,7 +121,9 @@ jobs:
121121
command: |
122122
make update_browser_versions_matrix
123123
./tests/build-backward-compatible/bootstrap.sh ${GRID_VERSION} ${BROWSER_VERSION} ${BROWSER_NAME} ${REUSE_BASE}
124+
EXIT_CODE=$?
124125
cat .env | xargs -I {} echo {} >> $GITHUB_ENV
126+
exit $EXIT_CODE
125127
- name: Build Hub image for testing
126128
if: env.REUSE_BASE == 'false'
127129
run: make hub

.github/workflows/release-edge-versions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
timeout_minutes: 10
7979
max_attempts: 3
8080
command: |
81-
make setup_dev_env
81+
INSTALL_DOCKER=false make setup_dev_env
8282
- name: Output Docker info
8383
run: docker info
8484
- name: Set Selenium base version

.github/workflows/release-firefox-versions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
timeout_minutes: 10
7979
max_attempts: 3
8080
command: |
81-
make setup_dev_env
81+
INSTALL_DOCKER=false make setup_dev_env
8282
- name: Output Docker info
8383
run: docker info
8484
- name: Set Selenium base version

Base/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LABEL org.opencontainers.image.source="https://github.com/${AUTHORS}/docker-sele
77
ARG VERSION
88
ARG RELEASE=selenium-${VERSION}
99
# Default value should be aligned with upstream Selenium (https://github.com/SeleniumHQ/selenium/blob/trunk/MODULE.bazel)
10-
ARG OPENTELEMETRY_VERSION=1.54.0
10+
ARG OPENTELEMETRY_VERSION=1.54.1
1111
ARG GRPC_VERSION=1.75.0
1212
ARG NETTY_VERSION=4.2.6.Final
1313
ARG CS_VERSION=2.1.25-M18
@@ -143,6 +143,8 @@ RUN --mount=type=secret,id=SEL_PASSWD \
143143
java -jar /tmp/cs fetch --classpath --cache /external_jars \
144144
io.opentelemetry:opentelemetry-exporter-otlp:${OPENTELEMETRY_VERSION} \
145145
io.grpc:grpc-netty:${GRPC_VERSION} \
146+
io.netty:netty-handler-proxy:${NETTY_VERSION} \
147+
io.netty:netty-parent:${NETTY_VERSION} \
146148
io.netty:netty-codec-http:${NETTY_VERSION} \
147149
io.netty:netty-codec-http2:${NETTY_VERSION} \
148150
io.netty:netty-codec:${NETTY_VERSION} \

Makefile

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ node_base: base video
171171
cd ./NodeBase && SEL_PASSWD=$(SEL_PASSWD) docker buildx build --platform $(PLATFORMS) $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg BASE=video --build-arg VERSION=$(FFMPEG_TAG_VERSION)-$(BUILD_DATE) --secret id=SEL_PASSWD -t $(NAME)/node-base:$(TAG_VERSION) .
172172

173173
chrome_only:
174-
case "$(PLATFORMS)" in \
174+
set -e; case "$(PLATFORMS)" in \
175175
*linux/amd64*) \
176176
echo "Google Chrome is only supported on linux/amd64" \
177177
&& cd ./NodeChrome && docker buildx build --platform linux/amd64 $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/node-chrome:$(TAG_VERSION) . \
@@ -193,7 +193,7 @@ chromium: node_base
193193
cd ./NodeChromium && docker buildx build --platform $(PLATFORMS) $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg CHROMIUM_VERSION=$(CHROMIUM_VERSION) -t $(NAME)/node-chromium:$(TAG_VERSION) .
194194

195195
edge_only:
196-
case "$(PLATFORMS)" in \
196+
set -e; case "$(PLATFORMS)" in \
197197
*linux/amd64*) \
198198
echo "Microsoft Edge is only supported on linux/amd64" \
199199
&& cd ./NodeEdge && docker buildx build --platform linux/amd64 $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/node-edge:$(TAG_VERSION) . \
@@ -242,7 +242,7 @@ standalone_firefox_beta: firefox_beta
242242
--build-arg NAMESPACE=$(NAME) --build-arg VERSION=beta --build-arg BASE=node-firefox -t $(NAME)/standalone-firefox:beta .
243243

244244
standalone_chrome_only:
245-
case "$(PLATFORMS)" in \
245+
set -e; case "$(PLATFORMS)" in \
246246
*linux/amd64*) \
247247
echo "Google Chrome is only supported on linux/amd64" \
248248
&& cd ./Standalone && docker buildx build --platform linux/amd64 $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg BASE=node-chrome -t $(NAME)/standalone-chrome:$(TAG_VERSION) . \
@@ -266,7 +266,7 @@ standalone_chromium: chromium
266266
cd ./Standalone && docker buildx build --platform $(PLATFORMS) $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg BASE=node-chromium -t $(NAME)/standalone-chromium:$(TAG_VERSION) .
267267

268268
standalone_edge_only:
269-
case "$(PLATFORMS)" in \
269+
set -e; case "$(PLATFORMS)" in \
270270
*linux/amd64*) \
271271
echo "Microsoft Edge is only supported on linux/amd64" \
272272
&& cd ./Standalone && docker buildx build --platform linux/amd64 $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg BASE=node-edge -t $(NAME)/standalone-edge:$(TAG_VERSION) . \
@@ -694,7 +694,7 @@ test: test_chrome \
694694
test_standalone_all_browsers
695695

696696
test_chrome:
697-
case "$(PLATFORMS)" in \
697+
set -e; case "$(PLATFORMS)" in \
698698
*linux/amd64*) \
699699
echo "Google Chrome is only supported on linux/amd64" \
700700
&& PLATFORMS=linux/amd64 VERSION=$(TAG_VERSION) NAMESPACE=$(NAMESPACE) BASE_RELEASE=$(BASE_RELEASE) BASE_VERSION=$(BASE_VERSION) BINDING_VERSION=$(BINDING_VERSION) SKIP_BUILD=true ./tests/bootstrap.sh NodeChrome \
@@ -716,7 +716,7 @@ test_chrome_standalone:
716716
esac
717717

718718
test_chrome_standalone_java:
719-
case "$(PLATFORMS)" in \
719+
set -e; case "$(PLATFORMS)" in \
720720
*linux/amd64*) \
721721
echo "Google Chrome is only supported on linux/amd64" \
722722
&& PLATFORMS=linux/amd64 VERSION=$(TAG_VERSION) NAMESPACE=$(NAMESPACE) BASE_RELEASE=$(BASE_RELEASE) BASE_VERSION=$(BASE_VERSION) BINDING_VERSION=$(BINDING_VERSION) SKIP_BUILD=true ./tests/SeleniumJavaTests/bootstrap_java.sh chrome standalone-chrome \
@@ -727,7 +727,7 @@ test_chrome_standalone_java:
727727
esac
728728

729729
test_edge:
730-
case "$(PLATFORMS)" in \
730+
set -e; case "$(PLATFORMS)" in \
731731
*linux/amd64*) \
732732
echo "Microsoft Edge is only supported on linux/amd64" \
733733
&& PLATFORMS=linux/amd64 VERSION=$(TAG_VERSION) NAMESPACE=$(NAMESPACE) BASE_RELEASE=$(BASE_RELEASE) BASE_VERSION=$(BASE_VERSION) BINDING_VERSION=$(BINDING_VERSION) SKIP_BUILD=true ./tests/bootstrap.sh NodeEdge \
@@ -738,7 +738,7 @@ test_edge:
738738
esac
739739

740740
test_edge_standalone:
741-
case "$(PLATFORMS)" in \
741+
set -e; case "$(PLATFORMS)" in \
742742
*linux/amd64*) \
743743
echo "Microsoft Edge is only supported on linux/amd64" \
744744
&& PLATFORMS=linux/amd64 VERSION=$(TAG_VERSION) NAMESPACE=$(NAMESPACE) BASE_RELEASE=$(BASE_RELEASE) BASE_VERSION=$(BASE_VERSION) BINDING_VERSION=$(BINDING_VERSION) SKIP_BUILD=true ./tests/bootstrap.sh StandaloneEdge \
@@ -749,7 +749,7 @@ test_edge_standalone:
749749
esac
750750

751751
test_edge_standalone_java:
752-
case "$(PLATFORMS)" in \
752+
set -e; case "$(PLATFORMS)" in \
753753
*linux/amd64*) \
754754
echo "Microsoft Edge is only supported on linux/amd64" \
755755
&& PLATFORMS=linux/amd64 VERSION=$(TAG_VERSION) NAMESPACE=$(NAMESPACE) BASE_RELEASE=$(BASE_RELEASE) BASE_VERSION=$(BASE_VERSION) BINDING_VERSION=$(BINDING_VERSION) SKIP_BUILD=true ./tests/SeleniumJavaTests/bootstrap_java.sh edge standalone-edge \
@@ -783,7 +783,7 @@ test_chromium_standalone_java:
783783
PLATFORMS=$(PLATFORMS) VERSION=$(TAG_VERSION) NAMESPACE=$(NAMESPACE) BASE_RELEASE=$(BASE_RELEASE) BASE_VERSION=$(BASE_VERSION) BINDING_VERSION=$(BINDING_VERSION) SKIP_BUILD=true ./tests/SeleniumJavaTests/bootstrap_java.sh chrome standalone-chromium
784784

785785
test_node_all_browsers:
786-
case "$(PLATFORMS)" in \
786+
set -e; case "$(PLATFORMS)" in \
787787
*linux/amd64*) \
788788
echo "Microsoft Edge is only supported on linux/amd64" \
789789
&& PLATFORMS=linux/amd64 VERSION=$(TAG_VERSION) NAMESPACE=$(NAMESPACE) BASE_RELEASE=$(BASE_RELEASE) BASE_VERSION=$(BASE_VERSION) BINDING_VERSION=$(BINDING_VERSION) SKIP_BUILD=true ./tests/bootstrap.sh NodeAllEdge \
@@ -797,7 +797,7 @@ test_node_all_browsers:
797797
./tests/bootstrap.sh NodeAllFirefox
798798

799799
test_standalone_all_browsers:
800-
case "$(PLATFORMS)" in \
800+
set -e; case "$(PLATFORMS)" in \
801801
*linux/amd64*) \
802802
echo "Microsoft Edge is only supported on linux/amd64" \
803803
&& PLATFORMS=linux/amd64 VERSION=$(TAG_VERSION) NAMESPACE=$(NAMESPACE) BASE_RELEASE=$(BASE_RELEASE) BASE_VERSION=$(BASE_VERSION) BINDING_VERSION=$(BINDING_VERSION) SKIP_BUILD=true ./tests/bootstrap.sh StandaloneAllEdge \

NodeChrome/install-chrome.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@ apt-get update -qqy
2525

2626
# Install Chrome based on version specification
2727
if echo "${CHROME_VERSION}" | grep -qE "google-chrome-stable[_|=][0-9]*"; then
28+
# This is version specific standard when install from apt repository e.g google-chrome-stable=121.0.6167.120-1
2829
# Install specific version
30+
VERSION_NUMBER=$(echo "$CHROME_VERSION" | cut -d'=' -f2)
2931
CHROME_VERSION=$(echo "$CHROME_VERSION" | tr '=' '_')
30-
echo "Installing specific Chrome version: ${CHROME_VERSION}"
31-
wget -qO google-chrome.deb "https://mirror.cs.uchicago.edu/google-chrome/pool/main/g/google-chrome-stable/${CHROME_VERSION}_$(dpkg --print-architecture).deb"
32+
echo "Installing specific Chrome version: ${VERSION_NUMBER}"
33+
wget -qO google-chrome.deb "https://github.com/NDViet/google-chrome-stable/releases/download/${VERSION_NUMBER}/${CHROME_VERSION}_$(dpkg --print-architecture).deb"
3234
apt-get -qqy --no-install-recommends install --allow-downgrades ./google-chrome.deb
3335
rm -rf google-chrome.deb
3436
else

tests/charts/make/chart_setup_env.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ DOCKER_VERSION=${DOCKER_VERSION:-""}
88
DOCKER_ENABLE_QEMU=${DOCKER_ENABLE_QEMU:-"true"}
99
HELM_VERSION=${HELM_VERSION:-"latest"}
1010
KUBERNETES_VERSION=${KUBERNETES_VERSION:-$(curl -L -s https://dl.k8s.io/release/stable.txt)}
11+
INSTALL_DOCKER=${INSTALL_DOCKER:-"true"}
1112

1213
# Function to be executed on command failure
1314
on_failure() {
@@ -16,6 +17,10 @@ on_failure() {
1617
exit $exit_status
1718
}
1819

20+
if [[ "${INSTALL_DOCKER}" != "true" ]]; then
21+
exit 0
22+
fi
23+
1924
# Trap ERR signal and call on_failure function
2025
trap 'on_failure' ERR
2126

0 commit comments

Comments
 (0)