Skip to content
This repository has been archived by the owner on Jun 22, 2024. It is now read-only.

Commit

Permalink
Merge pull request #65 from seleniumhq-community/4.18.0
Browse files Browse the repository at this point in the history
Sync upstream 4.18.0 [deploy]
  • Loading branch information
VietND96 committed Feb 21, 2024
2 parents e22b1f0 + 407e981 commit 46c7191
Show file tree
Hide file tree
Showing 126 changed files with 2,814 additions and 1,256 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ body:
attributes:
label: Docker Selenium version (image tag)
description: What version of Docker Selenium are you using?
placeholder: 4.17.0-20240123? Please use the full tag, avoid "latest"
placeholder: 4.18.0-20240220? Please use the full tag, avoid "latest"
validations:
required: true
- type: input
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Build & test
concurrency:
group: ${{ github.workflow }}

on:
workflow_dispatch:
push:
paths-ignore:
- '**.md'
Expand All @@ -19,11 +22,11 @@ jobs:
matrix:
use-random-user: [false, true]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@main
- name: Output Docker info
run: docker info
- name: Set up Python
uses: actions/setup-python@v5.0.0
uses: actions/setup-python@main
with:
python-version: '3.11'
check-latest: true
Expand All @@ -44,7 +47,7 @@ jobs:
- name: Build Docker images
run: VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make build
- name: Test Docker images
uses: nick-invision/retry@v2.9.0
uses: nick-invision/retry@master
with:
timeout_minutes: 20
max_attempts: 3
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Deploys

on:
workflow_dispatch:
# push:
# branches:
# - trunk
push:
branches:
- trunk

jobs:
deploy:
Expand All @@ -15,7 +15,7 @@ jobs:
permissions: write-all
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@main
with:
persist-credentials: false
fetch-depth: 0
Expand Down Expand Up @@ -49,6 +49,8 @@ jobs:
run: echo ${LATEST_TAG}
- name: Update tag in docs and files
run: ./update_tag_in_docs_and_files.sh ${LATEST_TAG} ${NEXT_TAG}
- name: Update chart CHANGELOG
run: ./generate_chart_changelog.sh HEAD
- name: Build images
run: VERSION="${GRID_VERSION}" BUILD_DATE=${BUILD_DATE} make build
- name: Login Docker Hub
Expand All @@ -57,7 +59,7 @@ jobs:
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
- name: Deploy new images
uses: nick-invision/retry@14672906e672a08bd6eeb15720e9ed3ce869cdd4 # v2
uses: nick-invision/retry@master
with:
timeout_minutes: 20
max_attempts: 3
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/helm-chart-release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: Release Charts
concurrency:
group: ${{ github.workflow }}

on:
push:
Expand All @@ -14,7 +16,7 @@ jobs:
permissions: write-all
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@main
with:
fetch-depth: 0

Expand All @@ -23,10 +25,14 @@ jobs:
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Get chart release notes (chart_release_notes.md)
run: ./generate_chart_changelog.sh HEAD

- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.6.0
uses: helm/chart-releaser-action@main
with:
mark_as_latest: false
skip_existing: true
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_RELEASE_NOTES_FILE: RELEASE_NOTES.md
87 changes: 64 additions & 23 deletions .github/workflows/helm-chart-test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: Lint and Test Helm Charts
name: Test Helm Charts
concurrency:
group: ${{ github.workflow }}

on:
push:
Expand All @@ -8,32 +10,53 @@ on:
paths-ignore:
- '**.md'
workflow_dispatch:
inputs:
request-timeout:
description: 'Test parameter for different request timeout'
required: false
default: '370'
schedule:
- cron: '0 0 * * *'

permissions:
contents: read

jobs:
build-and-test:
name: Test Helm charts
name: Test K8s
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test-strategy: [chart_test, chart_test_parallel_autoscaling, chart_test_https, chart_test_parallel_autoscaling_https]
include:
- k8s-version: 'v1.25.16'
test-strategy: job
cluster: 'kind'
- k8s-version: 'v1.26.14'
test-strategy: deployment
cluster: 'kind'
- k8s-version: 'v1.27.11'
test-strategy: job_https
cluster: 'kind'
- k8s-version: 'v1.28.7'
test-strategy: job_hostname
cluster: 'minikube'
- k8s-version: 'v1.29.2'
test-strategy: deployment_https
cluster: 'minikube'
env:
CLUSTER: ${{ matrix.cluster }}
KUBERNETES_VERSION: ${{ matrix.k8s-version }}
ARTIFACT_NAME: ${{ matrix.k8s-version }}-${{ matrix.test-strategy }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@main
- name: Output Docker info
run: docker info
- name: Set up Python
uses: actions/setup-python@v5.0.0
uses: actions/setup-python@main
with:
python-version: '3.11'
check-latest: true
- name: Install CA certificates
run: |
sudo apt install openssl -y
sudo apt install ca-certificates -y
sudo update-ca-certificates --fresh
- name: Get branch name (only for push to branch)
if: github.event_name == 'push'
run: echo "BRANCH=$(echo ${PUSH_BRANCH##*/})" >> $GITHUB_ENV
Expand All @@ -51,36 +74,54 @@ jobs:
echo "BUILD_DATE=$(date '+%Y%m%d')" >> $GITHUB_ENV
echo "IMAGE_REGISTRY=artifactory/selenium" >> $GITHUB_ENV
- name: Setup Kubernetes environment
run: make chart_setup_env
- name: Build Docker images
run: BUILD_ARGS="--build-arg TARGETARCH=amd64" NAME=${IMAGE_REGISTRY} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make build
- name: Build and lint charts
uses: nick-invision/retry@master
with:
timeout_minutes: 10
max_attempts: 3
command: CLUSTER=${CLUSTER} make chart_setup_env
- name: Build Helm charts
run: |
BUILD_DATE=${BUILD_DATE} make chart_build
echo "CHART_PACKAGE_PATH=$(cat /tmp/selenium_chart_version)" >> $GITHUB_ENV
echo "CHART_FILE_NAME=$(basename $(cat /tmp/selenium_chart_version))" >> $GITHUB_ENV
- name: Build Docker images
run: NAME=${IMAGE_REGISTRY} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make build
- name: Setup Kubernetes cluster
run: NAME=${IMAGE_REGISTRY} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make chart_cluster_setup
- name: Test Selenium Grid on Kubernetes
uses: nick-invision/retry@v2.9.0
uses: nick-invision/retry@master
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
- name: Test chart template
run: NAME=${IMAGE_REGISTRY} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make chart_test_template
- name: Test set custom CA certificate
run: NAME=${IMAGE_REGISTRY} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make test_custom_ca_cert
- name: Set test parameters
if: (matrix.test-strategy == 'job' || matrix.test-strategy == 'deployment') && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
run: |
echo "AUTOSCALING_POLL_INTERVAL=${AUTOSCALING_POLL_INTERVAL}" >> $GITHUB_ENV
env:
AUTOSCALING_POLL_INTERVAL: ${{ github.event.inputs.request-timeout || '370' }}
- name: Test Selenium Grid on Kubernetes ${{ matrix.k8s-version }} with Autoscaling ${{ matrix.test-strategy }}
uses: nick-invision/retry@master
with:
timeout_minutes: 30
max_attempts: 3
command: |
NAME=${IMAGE_REGISTRY} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make ${{ matrix.test-strategy }}
NAME=${IMAGE_REGISTRY} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make chart_test_autoscaling_${{ matrix.test-strategy }}
- name: Cleanup Kubernetes cluster
if: always()
run: make chart_cluster_cleanup
run: CLUSTER=${CLUSTER} make chart_cluster_cleanup
- name: Upload Helm chart package
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@main
with:
name: ${{ matrix.test-strategy }}_${{ env.CHART_FILE_NAME }}
name: ${{ env.ARTIFACT_NAME }}_${{ env.CHART_FILE_NAME }}
path: ${{ env.CHART_PACKAGE_PATH }}
- name: Upload chart test artifacts
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@main
with:
name: ${{ matrix.test-strategy }}-artifacts
name: ${{ env.ARTIFACT_NAME }}-artifacts
path: ./tests/tests/
if-no-files-found: ignore
2 changes: 1 addition & 1 deletion .github/workflows/label-commenter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ jobs:
comment:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@main
- name: Label Commenter
uses: peaceiris/actions-label-commenter@v1
4 changes: 2 additions & 2 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
permissions: write-all
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@main
with:
persist-credentials: false
fetch-depth: 0
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
- name: Create release notes (release_notes.md)
run: ./generate_release_notes.sh ${LATEST_TAG} origin/trunk ${GRID_VERSION} ${BUILD_DATE}
- name: Set up Python
uses: actions/setup-python@v5.0.0
uses: actions/setup-python@main
with:
python-version: '3.11'
check-latest: true
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/scan-dockerfile.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: Scan Dockerfile vulnerabilities
concurrency:
group: ${{ github.workflow }}

on:
push:
Expand All @@ -17,7 +19,7 @@ jobs:
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@main
- name: Set severity for PRs
if: github.event_name == 'pull_request' || github.event_name == 'push'
run: |
Expand All @@ -36,7 +38,7 @@ jobs:
format: 'sarif'
output: 'source-results.sarif'
scanners: 'vuln,secret,misconfig'
skip-dirs: 'tests,Video,NodeChromium,NodeFirefox'
skip-dirs: 'tests,Video'
exit-code: '${{ env.EXIT_CODE }}'
severity: '${{ env.SEVERITY }}'
limit-severities-for-sarif: true
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/test-video.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Test video files
concurrency:
group: ${{ github.workflow }}

on:
workflow_dispatch:
push:
paths-ignore:
- '**.md'
Expand All @@ -16,11 +19,11 @@ jobs:
name: Test video recorded through Docker Selenium
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@main
- name: Output Docker info
run: docker info
- name: Set up Python
uses: actions/setup-python@v5.0.0
uses: actions/setup-python@main
with:
python-version: '3.11'
check-latest: true
Expand All @@ -41,17 +44,17 @@ jobs:
- name: Run Docker Compose to record video
run: USE_RANDOM_USER_ID=${USE_RANDOM_USER} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make test_video
- name: Upload recorded Chrome video
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@main
with:
name: chrome_video
path: ./tests/videos/chrome_video.mp4
- name: Upload recorded Edge video
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@main
with:
name: edge_video
path: ./tests/videos/edge_video.mp4
- name: Upload recorded Firefox video
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@main
with:
name: firefox_video
path: ./tests/videos/firefox_video.mp4
33 changes: 0 additions & 33 deletions .github/workflows/update-chart-changelog.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/update-dev-beta-browser-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
CHANNEL: ${{ matrix.channel }}

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@main
- name: Setup environment variables
run: |
export SELENIUM_VERSION=$(grep BASE_VERSION Makefile | sed 's/.*,\([^)]*\))/\1/p' | head -n 1)
Expand Down
Loading

0 comments on commit 46c7191

Please sign in to comment.