Skip to content

Commit

Permalink
Merge branch 'trunk' into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
VietND96 authored May 30, 2024
2 parents 61a9753 + f2280e9 commit cf1b38d
Show file tree
Hide file tree
Showing 42 changed files with 629 additions and 257 deletions.
15 changes: 14 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ workflows:
build-and-test-multi-arch:
jobs:
- kubernetes-test:
name: "K8s test - Autoscaling disabled"
platforms: linux/arm64
machine-type: ubuntu2204arm64large
k8s-version: 'v1.25.16'
Expand All @@ -13,6 +14,7 @@ workflows:
test-existing-keda: false
test-upgrade: true
- kubernetes-test:
name: "K8s test - Autoscaling Jobs"
platforms: linux/arm64
machine-type: ubuntu2204arm64large
k8s-version: 'v1.26.15'
Expand All @@ -22,6 +24,7 @@ workflows:
test-existing-keda: true
test-upgrade: true
- kubernetes-test:
name: "K8s test - Autoscaling Deployments"
platforms: linux/arm64
machine-type: ubuntu2204arm64large
k8s-version: 'v1.27.14'
Expand All @@ -31,6 +34,7 @@ workflows:
test-existing-keda: true
test-upgrade: true
- kubernetes-test:
name: "K8s test - Autoscaling Jobs - HTTPS"
platforms: linux/arm64
machine-type: ubuntu2204arm64large
k8s-version: 'v1.28.10'
Expand All @@ -40,6 +44,7 @@ workflows:
test-existing-keda: true
test-upgrade: true
- kubernetes-test:
name: "K8s test - Autoscaling Jobs - Ingress hostname"
platforms: linux/arm64
machine-type: ubuntu2204arm64large
k8s-version: 'v1.29.5'
Expand All @@ -49,6 +54,7 @@ workflows:
test-existing-keda: false
test-upgrade: true
- kubernetes-test:
name: "K8s test - Autoscaling Deployments - HTTPS"
platforms: linux/arm64
machine-type: ubuntu2204arm64large
k8s-version: 'v1.30.1'
Expand All @@ -58,36 +64,43 @@ workflows:
test-existing-keda: false
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
- docker-test:
name: "Docker test - Use random user (false)"
test-strategy: test
use-random-user: false
platforms: linux/arm64
machine-type: ubuntu2204arm64
- docker-test:
name: "Docker test - Video recording"
test-strategy: test_video
use-random-user: false
platforms: linux/arm64
machine-type: ubuntu2204arm64
- 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
- docker-test:
name: "Docker test - Dynamic Grid"
test-strategy: test_node_docker
use-random-user: false
platforms: linux/arm64
machine-type: ubuntu2204arm64
- docker-test:
name: "Docker test - Parallel execution"
test-strategy: test_parallel
use-random-user: false
platforms: linux/arm64
machine-type: ubuntu2204arm64
- docker-test:
name: "Docker test - Node relay commands"
test-strategy: test_node_relay
use-random-user: false
platforms: linux/arm64
Expand Down Expand Up @@ -213,6 +226,6 @@ jobs:
command: |
make test_video_integrity
- run:
name: "Cleanup Kubernetes environment"
name: "Clean-up Kubernetes environment"
command: |
CLUSTER=${CLUSTER} make chart_cluster_cleanup
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.21.0-20240521? Please use the full tag, avoid "latest"
placeholder: 4.21.0-20240522? 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.30.0?
placeholder: 0.31.1?
validations:
required: false
14 changes: 14 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ on:
required: false
type: boolean
default: false
skip-commit:
description: 'Skip the commit'
required: false
type: boolean
default: false
push:
branches:
- trunk
Expand Down Expand Up @@ -121,18 +126,27 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
delete_release: true
- name: Commit files
if: env.LATEST_TAG != env.NEXT_TAG && github.event.inputs.skip-commit != 'true'
run: |
git config --local user.email "[email protected]"
git config --local user.name "Selenium CI Bot"
git commit -m "Update tag in docs and files" -a
- name: Push changes
if: env.LATEST_TAG != env.NEXT_TAG && github.event.inputs.skip-commit != 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.SELENIUM_CI_TOKEN }}
branch: trunk
- name: Create release notes (release_notes.md)
run: ./generate_release_notes.sh ${LATEST_TAG} origin/trunk ${GRID_VERSION} ${BUILD_DATE}
- name: Upload release notes
uses: actions/upload-artifact@main
with:
name: release_notes
path: ./release_notes.md
if-no-files-found: ignore
- name: Create Release
if: env.LATEST_TAG != env.NEXT_TAG && github.event.inputs.skip-commit != 'true'
id: create_release
uses: softprops/action-gh-release@master
with:
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/docker-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@main
- name: Set up containerd image store feature
if: matrix.test-strategy != 'test_node_relay'
uses: nick-invision/retry@master
with:
timeout_minutes: 10
Expand Down Expand Up @@ -141,7 +142,13 @@ jobs:
TEST_PARALLEL_HARDENING: ${{ github.event.inputs.parallel-hardening || 'true' }}
REQUEST_TIMEOUT: ${{ github.event.inputs.request-timeout || '400' }}
- name: Run Docker Compose to ${{ matrix.test-strategy }}
run: USE_RANDOM_USER_ID=${{ matrix.use-random-user }} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make ${{ matrix.test-strategy }}
uses: nick-invision/retry@master
with:
timeout_minutes: 20
max_attempts: 2
retry_wait_seconds: 60
command: |
USE_RANDOM_USER_ID=${{ matrix.use-random-user }} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make ${{ matrix.test-strategy }}
- name: Upload recorded video
if: matrix.test-video == true
uses: actions/upload-artifact@main
Expand Down
4 changes: 2 additions & 2 deletions Base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ARG VERSION
ARG RELEASE=selenium-${VERSION}
ARG AUTHORS=SeleniumHQ
# Default value should be aligned with upstream Selenium (https://github.com/SeleniumHQ/selenium/blob/trunk/java/maven_deps.bzl)
ARG OPENTELEMETRY_VERSION=1.36.0
ARG GRPC_VERSION=1.62.2
ARG OPENTELEMETRY_VERSION=1.38.0
ARG GRPC_VERSION=1.64.0
ARG CS_VERSION=2.1.10

#Arguments to define the user running Selenium
Expand Down
32 changes: 18 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ edge_upgrade_version:

# https://github.com/SeleniumHQ/docker-selenium/issues/992
# Additional tags for browser images
tag_and_push_browser_images: tag_and_push_chrome_images tag_and_push_firefox_images tag_and_push_edge_images
tag_and_push_browser_images: tag_and_push_chrome_images tag_and_push_chromium_images tag_and_push_firefox_images tag_and_push_edge_images

tag_and_push_chrome_images:
./tag_and_push_browser_images.sh $(VERSION) $(BUILD_DATE) $(NAMESPACE) $(PUSH_IMAGE) chrome
Expand Down Expand Up @@ -568,7 +568,7 @@ test_parallel: hub chrome firefox edge chromium
echo NODE_CHROME=chromium >> .env ; \
fi; \
echo TEST_PLATFORMS=$(PLATFORMS) >> .env ; \
docker compose --profile $(PLATFORMS) -f docker-compose-v3-test-parallel.yml up --no-log-prefix --exit-code-from tests ; \
DOCKER_DEFAULT_PLATFORM=$(PLATFORMS) docker compose --profile $(PLATFORMS) -f docker-compose-v3-test-parallel.yml up --no-log-prefix --exit-code-from tests ; \
done

test_video_dynamic_name:
Expand All @@ -578,7 +578,6 @@ test_video_dynamic_name:
# This should run on its own CI job. There is no need to combine it with the other tests.
# Its main purpose is to check that a video file was generated.
test_video: video hub chrome firefox edge chromium
# Running a few tests with docker compose to generate the videos
sudo rm -rf ./tests/tests
sudo rm -rf ./tests/videos; mkdir -p ./tests/videos
if [ "$(PLATFORMS)" = "linux/amd64" ]; then \
Expand Down Expand Up @@ -614,12 +613,12 @@ test_video: video hub chrome firefox edge chromium
echo VIDEO_FILE_NAME=$${VIDEO_FILE_NAME:-"firefox_video.mp4"} >> .env ; \
echo VIDEO_FILE_NAME_SUFFIX=$${VIDEO_FILE_NAME_SUFFIX:-"true"} >> .env ; \
fi ; \
docker compose -f docker-compose-v3-test-video.yml up --abort-on-container-exit ; \
DOCKER_DEFAULT_PLATFORM=$(PLATFORMS) docker compose -f docker-compose-v3-test-video.yml up --abort-on-container-exit ; \
done
make test_video_integrity

test_node_relay: hub node_base standalone_firefox
sudo rm -rf ./tests/tests
sudo rm -rf ./tests/tests ./tests/videos; mkdir -p ./tests/videos ; \
if [ "$(PLATFORMS)" = "linux/amd64" ]; then \
list_nodes="Android NodeFirefox" ; \
else \
Expand All @@ -641,24 +640,29 @@ test_node_relay: hub node_base standalone_firefox
echo TEST_NODE_RELAY=$$node >> .env ; \
echo UID=$$(id -u) >> .env ; \
echo BINDING_VERSION=$(BINDING_VERSION) >> .env ; \
PROFILE="relay_standalone" ; \
if [ $$node = "Android" ] ; then \
echo BROWSER=firefox >> .env && \
PROFILE="relay_appium" ; \
echo BROWSER=firefox >> .env \
&& echo BROWSER_NAME=firefox >> .env ; \
fi ; \
if [ $$node = "NodeChrome" ] ; then \
echo BROWSER=chrome >> .env ; \
echo BROWSER=chrome >> .env \
&& BROWSER_NAMEchrome >> .env ; \
fi ; \
if [ $$node = "NodeChromium" ] ; then \
echo BROWSER=chromium >> .env ; \
echo BROWSER=chromium >> .env \
&& echo BROWSER_NAME=chrome >> .env ; \
fi ; \
if [ $$node = "NodeEdge" ] ; then \
echo BROWSER=edge >> .env ; \
echo BROWSER=edge >> .env \
&& echo BROWSER_NAME=MicrosoftEdge >> .env ; \
fi ; \
if [ $$node = "NodeFirefox" ] ; then \
echo BROWSER=firefox >> .env ; \
echo BROWSER=firefox >> .env \
&& echo BROWSER_NAME=firefox >> .env ; \
fi ; \
docker compose --profile $${PROFILE} -f docker-compose-v3-test-node-relay.yml up --no-log-prefix --exit-code-from tests ; \
export $$(cat .env | xargs) ; \
envsubst < relay_config.toml > ./videos/relay_config.toml ; \
DOCKER_DEFAULT_PLATFORM=$(PLATFORMS) docker compose --profile $$node -f docker-compose-v3-test-node-relay.yml up --no-log-prefix --exit-code-from tests ; \
if [ $$? -ne 0 ]; then exit 1; fi ; \
done

Expand Down Expand Up @@ -701,7 +705,7 @@ test_node_docker: hub standalone_docker standalone_chrome standalone_firefox sta
fi ; \
export $$(cat .env | xargs) ; \
envsubst < config.toml > ./videos/config.toml ; \
docker compose -f docker-compose-v3-test-node-docker.yaml up --no-log-prefix --exit-code-from tests ; \
DOCKER_DEFAULT_PLATFORM=$(PLATFORMS) docker compose -f docker-compose-v3-test-node-docker.yaml up --no-log-prefix --exit-code-from tests ; \
if [ $$? -ne 0 ]; then exit 1; fi ; \
if [ -d "$$DOWNLOADS_DIR" ] && [ $$(ls -1q $$DOWNLOADS_DIR | wc -l) -eq 0 ]; then \
echo "Mounted downloads directory is empty. Downloaded files could not be retrieved!" ; \
Expand Down
8 changes: 4 additions & 4 deletions NodeDocker/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# Configs have a mapping between the Docker image to use and the capabilities that need to be matched to
# start a container with the given image.
configs = [
"selenium/standalone-firefox:4.21.0-20240521", '{"browserName": "firefox", "platformName": "linux"}',
"selenium/standalone-chrome:4.21.0-20240521", '{"browserName": "chrome", "platformName": "linux"}',
"selenium/standalone-edge:4.21.0-20240521", '{"browserName": "MicrosoftEdge", "platformName": "linux"}'
"selenium/standalone-firefox:4.21.0-20240522", '{"browserName": "firefox", "platformName": "linux"}',
"selenium/standalone-chrome:4.21.0-20240522", '{"browserName": "chrome", "platformName": "linux"}',
"selenium/standalone-edge:4.21.0-20240522", '{"browserName": "MicrosoftEdge", "platformName": "linux"}'
]

# URL for connecting to the docker daemon
Expand All @@ -14,7 +14,7 @@ configs = [
# socat -4 TCP-LISTEN:2375,fork UNIX-CONNECT:/var/run/docker.sock
url = "http://127.0.0.1:2375"
# Docker image used for video recording
video-image = "selenium/video:ffmpeg-6.1.1-20240521"
video-image = "selenium/video:ffmpeg-6.1.1-20240522"

# Uncomment the following section if you are running the node on a separate VM
# Fill out the placeholders with appropriate values
Expand Down
Loading

0 comments on commit cf1b38d

Please sign in to comment.