From 6e05b35e32c1572f89a28f5eddccf8f79242cf99 Mon Sep 17 00:00:00 2001 From: Viet Nguyen Duc Date: Sat, 31 Aug 2024 06:12:45 +0000 Subject: [PATCH] build: spin Chromium version Signed-off-by: Viet Nguyen Duc --- .circleci/config.yml | 12 ++++++------ .github/workflows/helm-chart-test.yml | 12 ++++++------ Makefile | 3 ++- NodeChromium/Dockerfile | 22 +++++++++++++--------- 4 files changed, 27 insertions(+), 22 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6459f94a73..a40aec57ee 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,7 +7,7 @@ workflows: name: "K8s test - Autoscaling disabled" platforms: linux/arm64 machine-type: ubuntu2204arm64large - k8s-version: 'v1.25.16' + k8s-version: 'v1.26.15' test-strategy: disabled cluster: 'minikube' helm-version: 'v3.10.3' @@ -16,7 +16,7 @@ workflows: name: "K8s test - Autoscaling Jobs" platforms: linux/arm64 machine-type: ubuntu2204arm64large - k8s-version: 'v1.26.15' + k8s-version: 'v1.27.16' test-strategy: job cluster: 'minikube' helm-version: 'v3.11.3' @@ -25,7 +25,7 @@ workflows: name: "K8s test - Autoscaling Deployments" platforms: linux/arm64 machine-type: ubuntu2204arm64large - k8s-version: 'v1.27.16' + k8s-version: 'v1.28.13' test-strategy: deployment cluster: 'minikube' helm-version: 'v3.12.3' @@ -34,7 +34,7 @@ workflows: name: "K8s test - Autoscaling Jobs - HTTPS" platforms: linux/arm64 machine-type: ubuntu2204arm64large - k8s-version: 'v1.28.13' + k8s-version: 'v1.29.8' test-strategy: job_https cluster: 'minikube' helm-version: 'v3.13.3' @@ -43,7 +43,7 @@ workflows: name: "K8s test - Autoscaling Jobs - Ingress hostname" platforms: linux/arm64 machine-type: ubuntu2204arm64large - k8s-version: 'v1.29.8' + k8s-version: 'v1.30.4' test-strategy: job_hostname cluster: 'minikube' helm-version: 'v3.14.4' @@ -52,7 +52,7 @@ workflows: name: "K8s test - Autoscaling Deployments - HTTPS" platforms: linux/arm64 machine-type: ubuntu2204arm64large - k8s-version: 'v1.30.4' + k8s-version: 'v1.31.0' test-strategy: deployment_https cluster: 'minikube' helm-version: 'v3.15.4' diff --git a/.github/workflows/helm-chart-test.yml b/.github/workflows/helm-chart-test.yml index 548abf05b0..daadc37f92 100644 --- a/.github/workflows/helm-chart-test.yml +++ b/.github/workflows/helm-chart-test.yml @@ -34,37 +34,37 @@ jobs: fail-fast: false matrix: include: - - k8s-version: 'v1.25.16' + - k8s-version: 'v1.26.15' test-strategy: disabled cluster: 'minikube' helm-version: 'v3.10.3' docker-version: '24.0.9' test-upgrade: true - - k8s-version: 'v1.26.15' + - k8s-version: 'v1.27.16' test-strategy: job cluster: 'minikube' helm-version: 'v3.11.3' docker-version: '24.0.9' test-upgrade: true - - k8s-version: 'v1.27.16' + - k8s-version: 'v1.28.13' test-strategy: deployment cluster: 'minikube' helm-version: 'v3.12.3' docker-version: '24.0.9' test-upgrade: true - - k8s-version: 'v1.28.13' + - k8s-version: 'v1.29.8' test-strategy: job_https cluster: 'minikube' helm-version: 'v3.13.3' docker-version: '25.0.5' test-upgrade: true - - k8s-version: 'v1.29.8' + - k8s-version: 'v1.30.4' test-strategy: job_hostname cluster: 'minikube' helm-version: 'v3.14.4' docker-version: '26.1.4' test-upgrade: true - - k8s-version: 'v1.30.4' + - k8s-version: 'v1.31.0' test-strategy: deployment_https cluster: 'minikube' helm-version: 'v3.15.4' diff --git a/Makefile b/Makefile index 19864a11cc..5bb04ac01d 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,7 @@ FFMPEG_BASED_NAME := $(or $(FFMPEG_BASED_NAME),$(FFMPEG_BASED_NAME),linuxserver) FFMPEG_BASED_TAG := $(or $(FFMPEG_BASED_TAG),$(FFMPEG_BASED_TAG),7.0.2) PLATFORMS := $(or $(PLATFORMS),$(shell echo $$PLATFORMS),linux/amd64) SEL_PASSWD := $(or $(SEL_PASSWD),$(SEL_PASSWD),secret) +CHROMIUM_VERSION := $(or $(CHROMIUM_VERSION),$(CHROMIUM_VERSION),latest) all: hub \ distributor \ @@ -140,7 +141,7 @@ chrome_beta: cd ./NodeChrome && docker buildx build --platform $(PLATFORMS) $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg CHROME_VERSION=google-chrome-beta -t $(NAME)/node-chrome:beta . chromium: node_base - cd ./NodeChromium && docker buildx build --platform $(PLATFORMS) $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/node-chromium:$(TAG_VERSION) . + cd ./NodeChromium && docker buildx build --platform $(PLATFORMS) $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg CHROMIUM_VERSION=$(CHROMIUM_VERSION) -t $(NAME)/node-chromium:$(TAG_VERSION) . edge: node_base case "$(PLATFORMS)" in \ diff --git a/NodeChromium/Dockerfile b/NodeChromium/Dockerfile index 0086c7198e..f448aa8244 100644 --- a/NodeChromium/Dockerfile +++ b/NodeChromium/Dockerfile @@ -7,11 +7,22 @@ LABEL authors=${AUTHORS} USER root # Install Chromium +ARG CHROMIUM_VERSION="latest" RUN echo "deb http://deb.debian.org/debian/ sid main" >> /etc/apt/sources.list \ && apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0E98404D386FA1D9 6ED0E7B82643E131 \ && apt-get update -qqy \ - && apt-get -qqy --no-install-recommends install chromium chromium-l10n \ - && rm -rf /var/lib/apt/lists/* /var/cache/apt/* + && if [ "${CHROMIUM_VERSION}" = "latest" ]; \ + then apt-get -qqy --no-install-recommends install chromium-common chromium chromium-l10n chromium-shell chromium-sandbox chromium-driver; \ + else mkdir -p /tmp/chromium \ + && wget -q http://deb.debian.org/debian/pool/main/c/chromium/chromium-common_${CHROMIUM_VERSION}-1_$(dpkg --print-architecture).deb -O /tmp/chromium/chromium-common.deb \ + && wget -q http://deb.debian.org/debian/pool/main/c/chromium/chromium_${CHROMIUM_VERSION}-1_$(dpkg --print-architecture).deb -O /tmp/chromium/chromium.deb \ + && wget -q http://deb.debian.org/debian/pool/main/c/chromium/chromium-l10n_${CHROMIUM_VERSION}-1_all.deb -O /tmp/chromium/chromium-l10n.deb \ + && wget -q http://deb.debian.org/debian/pool/main/c/chromium/chromium-shell_${CHROMIUM_VERSION}-1_$(dpkg --print-architecture).deb -O /tmp/chromium/chromium-shell.deb \ + && wget -q http://deb.debian.org/debian/pool/main/c/chromium/chromium-sandbox_${CHROMIUM_VERSION}-1_$(dpkg --print-architecture).deb -O /tmp/chromium/chromium-sandbox.deb \ + && wget -q http://deb.debian.org/debian/pool/main/c/chromium/chromium-driver_${CHROMIUM_VERSION}-1_$(dpkg --print-architecture).deb -O /tmp/chromium/chromium-driver.deb \ + && apt-get -qqyf install /tmp/chromium/chromium-common.deb /tmp/chromium/chromium.deb /tmp/chromium/chromium-l10n.deb /tmp/chromium/chromium-shell.deb /tmp/chromium/chromium-sandbox.deb /tmp/chromium/chromium-driver.deb ; \ + fi \ + && rm -rf /var/lib/apt/lists/* /var/cache/apt/* /tmp/chromium #================================= # Chromium Launch Script Wrapper @@ -19,13 +30,6 @@ RUN echo "deb http://deb.debian.org/debian/ sid main" >> /etc/apt/sources.list \ COPY wrap_chromium_binary /opt/bin/wrap_chromium_binary RUN /opt/bin/wrap_chromium_binary -#============================================ -# Chromium webdriver -#============================================ -RUN apt-get update -qqy \ - && apt-get -qqy --no-install-recommends install chromium-driver \ - && rm -rf /var/lib/apt/lists/* /var/cache/apt/* - #============================================ # Chromium cleanup script and supervisord file #============================================