Skip to content

Commit

Permalink
Merge branch 'trunk' into blacksmith-migration-dedd69b
Browse files Browse the repository at this point in the history
  • Loading branch information
VietND96 authored Nov 7, 2024
2 parents ed2fae2 + d2c56dd commit 32fe7f9
Show file tree
Hide file tree
Showing 94 changed files with 2,000 additions and 537 deletions.
73 changes: 62 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,25 @@ version: 2.1
workflows:
build-and-test-multi-arch:
jobs:
- kubernetes-test:
name: "K8s test - Playwright Connect Autoscaling Grid"
platforms: linux/arm64
machine-type: ubuntu2204arm64large
k8s-version: 'v1.25.16'
test-strategy: playwright_connect_grid
cluster: 'minikube'
helm-version: 'v3.10.3'
docker-version: '24.0.9'
test-upgrade: true
- kubernetes-test:
name: "K8s test - Autoscaling disabled"
platforms: linux/arm64
machine-type: ubuntu2204arm64large
k8s-version: 'v1.26.15'
test-strategy: disabled
cluster: 'minikube'
helm-version: 'v3.10.3'
helm-version: 'v3.11.3'
docker-version: '24.0.9'
test-upgrade: true
- kubernetes-test:
name: "K8s test - Autoscaling Jobs"
Expand All @@ -19,98 +30,121 @@ workflows:
k8s-version: 'v1.27.16'
test-strategy: job
cluster: 'minikube'
helm-version: 'v3.11.3'
helm-version: 'v3.12.3'
docker-version: '24.0.9'
test-upgrade: true
- kubernetes-test:
name: "K8s test - Autoscaling Deployments"
platforms: linux/arm64
machine-type: ubuntu2204arm64large
k8s-version: 'v1.28.13'
k8s-version: 'v1.28.15'
test-strategy: deployment
cluster: 'minikube'
helm-version: 'v3.12.3'
helm-version: 'v3.13.3'
docker-version: '24.0.9'
test-upgrade: true
- kubernetes-test:
name: "K8s test - Autoscaling Jobs - HTTPS"
platforms: linux/arm64
machine-type: ubuntu2204arm64large
k8s-version: 'v1.29.8'
k8s-version: 'v1.29.10'
test-strategy: job_https
cluster: 'minikube'
helm-version: 'v3.13.3'
helm-version: 'v3.14.3'
docker-version: '25.0.5'
test-upgrade: true
- kubernetes-test:
name: "K8s test - Autoscaling Jobs - Ingress hostname"
platforms: linux/arm64
machine-type: ubuntu2204arm64large
k8s-version: 'v1.30.4'
k8s-version: 'v1.30.6'
test-strategy: job_hostname
cluster: 'minikube'
helm-version: 'v3.14.4'
helm-version: 'v3.15.4'
docker-version: '26.1.4'
test-upgrade: true
- kubernetes-test:
name: "K8s test - Autoscaling Deployments - HTTPS"
platforms: linux/arm64
machine-type: ubuntu2204arm64large
k8s-version: 'v1.31.0'
k8s-version: 'v1.31.2'
test-strategy: deployment_https
cluster: 'minikube'
helm-version: 'v3.15.4'
helm-version: 'v3.16.1'
docker-version: '27.2.0'
test-upgrade: true
- docker-test:
name: "Docker test - Use random user (true)"
test-strategy: test
use-random-user: true
platforms: linux/arm64
machine-type: ubuntu2204arm64
firefox-install-lang-package: false
enable-managed-downloads: false
- docker-test:
name: "Docker test - Use random user (false)"
test-strategy: test
use-random-user: false
platforms: linux/arm64
machine-type: ubuntu2204arm64
firefox-install-lang-package: false
enable-managed-downloads: false
- docker-test:
name: "Docker test - Video recording"
test-strategy: test_video
use-random-user: false
platforms: linux/arm64
machine-type: ubuntu2204arm64
firefox-install-lang-package: true
enable-managed-downloads: true
- docker-test:
name: "Docker test - Video recording dynamic file name"
test-strategy: test_video_dynamic_name
use-random-user: false
platforms: linux/arm64
machine-type: ubuntu2204arm64
firefox-install-lang-package: true
enable-managed-downloads: true
- docker-test:
name: "Docker test - Video recording standalone"
test-strategy: test_video_standalone
use-random-user: false
platforms: linux/arm64
machine-type: ubuntu2204arm64
firefox-install-lang-package: true
enable-managed-downloads: true
- docker-test:
name: "Docker test - Dynamic Grid"
test-strategy: test_node_docker
use-random-user: false
platforms: linux/arm64
machine-type: ubuntu2204arm64
firefox-install-lang-package: true
enable-managed-downloads: false
- docker-test:
name: "Docker test - Dynamic Grid Standalone"
test-strategy: test_standalone_docker
use-random-user: false
platforms: linux/arm64
machine-type: ubuntu2204arm64
firefox-install-lang-package: true
enable-managed-downloads: true
- docker-test:
name: "Docker test - Parallel execution"
test-strategy: test_parallel
use-random-user: false
platforms: linux/arm64
machine-type: ubuntu2204arm64
firefox-install-lang-package: true
enable-managed-downloads: true
- docker-test:
name: "Docker test - Node relay commands"
test-strategy: test_node_relay
use-random-user: false
platforms: linux/arm64
machine-type: ubuntu2204arm64
firefox-install-lang-package: true
enable-managed-downloads: true

executors:
ubuntu2204arm64:
Expand All @@ -133,13 +167,19 @@ jobs:
type: string
use-random-user:
type: boolean
firefox-install-lang-package:
type: boolean
enable-managed-downloads:
type: boolean
executor: << parameters.machine-type >>
environment:
NAMESPACE: selenium
BUILD_DATE: today
PLATFORMS: << parameters.platforms >>
TEST_STRATEGY: << parameters.test-strategy >>
USE_RANDOM_USER: << parameters.use-random-user >>
TEST_FIREFOX_INSTALL_LANG_PACKAGE: << parameters.firefox-install-lang-package >>
SELENIUM_ENABLE_MANAGED_DOWNLOADS: << parameters.enable-managed-downloads >>
steps:
- run:
name: "Prepare workflow environment variables"
Expand Down Expand Up @@ -179,7 +219,9 @@ jobs:
command: |
N=3
while [ $N -gt 0 ]; do
output=$(eval "USE_RANDOM_USER_ID=${USE_RANDOM_USER} PLATFORMS=${PLATFORMS} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make ${TEST_STRATEGY}")
output=$(eval "USE_RANDOM_USER_ID=${USE_RANDOM_USER} PLATFORMS=${PLATFORMS} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} \
TEST_FIREFOX_INSTALL_LANG_PACKAGE=${TEST_FIREFOX_INSTALL_LANG_PACKAGE} SELENIUM_ENABLE_MANAGED_DOWNLOADS=${SELENIUM_ENABLE_MANAGED_DOWNLOADS} \
make ${TEST_STRATEGY}")
status=$?
if [ $status -eq 0 ]; then
echo "Tests passed"
Expand All @@ -206,6 +248,8 @@ jobs:
type: string
helm-version:
type: string
docker-version:
type: string
test-upgrade:
type: boolean
executor: << parameters.machine-type >>
Expand All @@ -217,6 +261,7 @@ jobs:
CLUSTER: << parameters.cluster >>
KUBERNETES_VERSION: << parameters.k8s-version >>
HELM_VERSION: << parameters.helm-version >>
DOCKER_VERSION: << parameters.docker-version >>
TEST_UPGRADE_CHART: << parameters.test-upgrade >>
steps:
- run:
Expand Down Expand Up @@ -266,14 +311,20 @@ jobs:
name: "Test Selenium Grid on Kubernetes"
no_output_timeout: 30m
command: |
if [ "${TEST_STRATEGY}" == "playwright_connect_grid" ]; then
PLATFORMS=${PLATFORMS} NAME=${IMAGE_REGISTRY} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} TEST_UPGRADE_CHART=false make chart_test_autoscaling_${TEST_STRATEGY} && make test_video_integrity
exit $?
fi
N=3
while [ $N -gt 0 ]; do
output=$(eval "PLATFORMS=${PLATFORMS} NAME=${IMAGE_REGISTRY} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} TEST_UPGRADE_CHART=false make chart_test_autoscaling_${TEST_STRATEGY} && make test_video_integrity")
status=$?
if [ $status -eq 0 ]; then
echo "${output}"
echo "Tests passed"
exit 0
else
echo "${output}"
echo "Tests failed. Retrying..."
N=$((N-1))
sleep 10
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ body:
attributes:
label: Docker Selenium version (image tag)
description: What version of Docker Selenium are you using?
placeholder: 4.25.0-20240922? Please use the full tag, avoid "latest"
placeholder: 4.26.0-20241101? Please use the full tag, avoid "latest"
validations:
required: true
- type: input
id: chart-version
attributes:
label: Selenium Grid chart version (chart version)
description: What version of Selenium Grid chart are you using?
placeholder: 0.35.1?
placeholder: 0.36.3?
validations:
required: false
9 changes: 8 additions & 1 deletion .github/workflows/helm-chart-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ on:

permissions: write-all

env:
FORCE_RELEASE: ${{ github.event.inputs.release == 'true' }}

jobs:
helm-chart-test:
if: github.event.inputs.skip-test != 'true'
Expand Down Expand Up @@ -74,7 +77,11 @@ jobs:
- name: Get chart release notes (chart_release_notes.md)
run: |
./generate_chart_changelog.sh
echo "IS_RELEASE=$(cat /tmp/selenium_chart_release)" >> $GITHUB_ENV
if [ "${FORCE_RELEASE}" == "true" ]; then
echo "IS_RELEASE=true" >> $GITHUB_ENV
else
echo "IS_RELEASE=$(cat /tmp/selenium_chart_release)" >> $GITHUB_ENV
fi
- name: Login Docker Hub
run: helm registry login registry-1.docker.io -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
Expand Down
36 changes: 25 additions & 11 deletions .github/workflows/helm-chart-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,49 +34,63 @@ jobs:
fail-fast: false
matrix:
include:
- k8s-version: 'v1.25.16'
test-strategy: playwright_connect_grid
cluster: 'minikube'
helm-version: 'v3.10.3'
docker-version: '24.0.9'
test-upgrade: true
service-mesh: true
- k8s-version: 'v1.26.15'
test-strategy: disabled
cluster: 'minikube'
helm-version: 'v3.10.3'
helm-version: 'v3.11.3'
docker-version: '24.0.9'
test-upgrade: true
service-mesh: false
- k8s-version: 'v1.27.16'
test-strategy: job
cluster: 'minikube'
helm-version: 'v3.11.3'
helm-version: 'v3.12.3'
docker-version: '24.0.9'
test-upgrade: true
- k8s-version: 'v1.28.13'
service-mesh: true
- k8s-version: 'v1.28.15'
test-strategy: deployment
cluster: 'minikube'
helm-version: 'v3.12.3'
helm-version: 'v3.13.3'
docker-version: '24.0.9'
test-upgrade: true
- k8s-version: 'v1.29.8'
service-mesh: true
- k8s-version: 'v1.29.10'
test-strategy: job_https
cluster: 'minikube'
helm-version: 'v3.13.3'
helm-version: 'v3.14.3'
docker-version: '25.0.5'
test-upgrade: true
- k8s-version: 'v1.30.4'
service-mesh: false
- k8s-version: 'v1.30.6'
test-strategy: job_hostname
cluster: 'minikube'
helm-version: 'v3.14.4'
helm-version: 'v3.15.4'
docker-version: '26.1.4'
test-upgrade: true
- k8s-version: 'v1.31.0'
service-mesh: false
- k8s-version: 'v1.31.2'
test-strategy: deployment_https
cluster: 'minikube'
helm-version: 'v3.15.4'
helm-version: 'v3.16.1'
docker-version: '27.2.0'
test-upgrade: true
service-mesh: false
env:
CLUSTER: ${{ matrix.cluster }}
KUBERNETES_VERSION: ${{ matrix.k8s-version }}
ARTIFACT_NAME: "${{ matrix.k8s-version }}-${{ matrix.test-strategy }}"
HELM_VERSION: ${{ matrix.helm-version }}
DOCKER_VERSION: ${{ matrix.docker-version }}
TEST_UPGRADE_CHART: ${{ matrix.test-upgrade }}
SERVICE_MESH: ${{ matrix.service-mesh }}
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
Expand Down Expand Up @@ -142,7 +156,7 @@ jobs:
with:
timeout_minutes: 10
max_attempts: 3
command: CLUSTER=${CLUSTER} KUBERNETES_VERSION=${KUBERNETES_VERSION} NAME=${IMAGE_REGISTRY} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make chart_cluster_setup
command: CLUSTER=${CLUSTER} SERVICE_MESH=${SERVICE_MESH} KUBERNETES_VERSION=${KUBERNETES_VERSION} NAME=${IMAGE_REGISTRY} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make chart_cluster_setup
- name: Test chart template
run: NAME=${IMAGE_REGISTRY} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make chart_test_template
- name: Test set custom CA certificate
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/update-chart-readme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Update chart configuration table

on:
workflow_dispatch:

jobs:
update-chart-readme:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout code
uses: actions/checkout@main
with:
persist-credentials: false
fetch-depth: 0
- name: Set up environment
uses: nick-invision/retry@master
with:
timeout_minutes: 10
max_attempts: 3
command: |
make setup_dev_env
- name: Update chart configuration table
run: make generate_readme_charts
- name: Check for differences
id: check_diff
run: |
if git diff --exit-code; then
echo "diff=false" >> $GITHUB_ENV
else
echo "diff=true" >> $GITHUB_ENV
fi
- name: Commit files
if: env.diff == 'true'
run: |
git config --local user.email "selenium-ci@users.noreply.github.com"
git config --local user.name "Selenium CI Bot"
git commit -m "Update chart configuration table" -a
- name: Push changes
if: env.diff == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.SELENIUM_CI_TOKEN }}
branch: ${{ env.BRANCH_NAME }}
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
Loading

0 comments on commit 32fe7f9

Please sign in to comment.