Skip to content

Commit

Permalink
build: spin Chromium version
Browse files Browse the repository at this point in the history
Signed-off-by: Viet Nguyen Duc <[email protected]>
  • Loading branch information
VietND96 committed Aug 31, 2024
1 parent d57a8e7 commit 6e05b35
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 22 deletions.
12 changes: 6 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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'
Expand All @@ -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'
Expand All @@ -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'
Expand All @@ -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'
Expand All @@ -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'
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/helm-chart-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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 \
Expand Down
22 changes: 13 additions & 9 deletions NodeChromium/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,29 @@ 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
#=================================
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
#============================================
Expand Down

0 comments on commit 6e05b35

Please sign in to comment.