From 42b9a87222ed0a97a0259bf8a04972bce111d1b5 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 ++++----- .../update-dev-beta-browser-images.yml | 17 ++++++------- Makefile | 3 ++- NodeChromium/Dockerfile | 25 +++++++++++-------- 5 files changed, 37 insertions(+), 32 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/.github/workflows/update-dev-beta-browser-images.yml b/.github/workflows/update-dev-beta-browser-images.yml index d327ea30d7..dde9be0ccc 100644 --- a/.github/workflows/update-dev-beta-browser-images.yml +++ b/.github/workflows/update-dev-beta-browser-images.yml @@ -22,16 +22,15 @@ jobs: CHANNEL: ${{ matrix.channel }} steps: - - uses: actions/checkout@main - - name: Set up QEMU - uses: docker/setup-qemu-action@master - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@master - with: - platforms: linux/amd64,linux/arm64 - use: false + - name: Checkout code + uses: actions/checkout@main - name: Set up containerd image store feature - run: make set_containerd_image_store + uses: nick-invision/retry@master + with: + timeout_minutes: 10 + max_attempts: 3 + command: | + make setup_dev_env - name: Setup environment variables run: | export SELENIUM_VERSION=$(grep BASE_VERSION Makefile | sed 's/.*,\([^)]*\))/\1/p' | head -n 1) diff --git a/Makefile b/Makefile index 19864a11cc..ec3b719448 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),128.0.6613.113) 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..dbdd0edd20 100644 --- a/NodeChromium/Dockerfile +++ b/NodeChromium/Dockerfile @@ -7,10 +7,22 @@ LABEL authors=${AUTHORS} USER root # Install Chromium -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 \ +ARG CHROMIUM_VERSION="latest" +ARG CHROMIUM_DEB_SITE="http://deb.debian.org/debian" +RUN echo "deb ${CHROMIUM_DEB_SITE}/ sid main" >> /etc/apt/sources.list \ + && wget -qO- https://ftp-master.debian.org/keys/archive-key-12.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/debian-archive-keyring.gpg \ + && wget -qO- https://ftp-master.debian.org/keys/archive-key-12-security.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/debian-archive-security-keyring.gpg \ && apt-get update -qqy \ - && apt-get -qqy --no-install-recommends install chromium chromium-l10n \ + && if [ "${CHROMIUM_VERSION}" = "latest" ]; \ + then apt-get -qqy --no-install-recommends install chromium-common chromium chromium-l10n chromium-driver; \ + else mkdir -p /tmp/chromium \ + && wget -q ${CHROMIUM_DEB_SITE}/pool/main/c/chromium/chromium-common_${CHROMIUM_VERSION}-1_$(dpkg --print-architecture).deb -O /tmp/chromium/chromium-common.deb \ + && wget -q ${CHROMIUM_DEB_SITE}/pool/main/c/chromium/chromium_${CHROMIUM_VERSION}-1_$(dpkg --print-architecture).deb -O /tmp/chromium/chromium.deb \ + && wget -q ${CHROMIUM_DEB_SITE}/pool/main/c/chromium/chromium-l10n_${CHROMIUM_VERSION}-1_all.deb -O /tmp/chromium/chromium-l10n.deb \ + && wget -q ${CHROMIUM_DEB_SITE}/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-driver.deb \ + && rm -rf /tmp/chromium; \ + fi \ && rm -rf /var/lib/apt/lists/* /var/cache/apt/* #================================= @@ -19,13 +31,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 #============================================