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

Commit 65c4b0b

Browse files
authored
Merge pull request #57 from fhoeben/add_chromium_arm64_circle
Attempt to build and test on arm64 and amd64 using upstream trunk with chromium
2 parents 247e34e + df717e0 commit 65c4b0b

File tree

132 files changed

+3794
-1257
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+3794
-1257
lines changed

.circleci/config.yml

Lines changed: 324 additions & 62 deletions
Large diffs are not rendered by default.

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,15 @@ body:
1919
validations:
2020
required: true
2121
- type: textarea
22-
id: repro-command
22+
id: reproduce-command
2323
attributes:
24-
label: Command used to start Selenium Grid with Docker
24+
label: Command used to start Selenium Grid with Docker (or Kubernetes)
2525
description: |
26-
What command do you use to start Selenium Grid with Docker?
26+
What command do you use to start Selenium Grid with Docker (or Kubernetes)?
2727
placeholder: |
2828
Please share the script or docker-compose file used. This will be automatically
2929
formatted into code, so no need for backticks.
30+
If Kubernetes used, please share the YAML file, or chart values used to deploy the cluster.
3031
Be sure to include an SSCCE (Short, Self Contained, Correct
3132
[compilable] example) http://sscce.org/
3233
render: shell
@@ -47,14 +48,22 @@ body:
4748
attributes:
4849
label: Operating System
4950
description: What host operating system are you using to run docker-selenium?
50-
placeholder: Windows 10? macOS BigSur? Ubuntu?
51+
placeholder: Windows 10? macOS BigSur? Ubuntu? Kubernetes (Minikube, EKS, GKE, AKS, OpenShift, Rancher, etc.) version?
5152
validations:
5253
required: true
5354
- type: input
5455
id: version
5556
attributes:
56-
label: Docker Selenium version (tag)
57+
label: Docker Selenium version (image tag)
5758
description: What version of Docker Selenium are you using?
58-
placeholder: 4.12.1-20230920? Please use the full tag, avoid "latest"
59+
placeholder: 4.16.1-20231212? Please use the full tag, avoid "latest"
5960
validations:
60-
required: true
61+
required: true
62+
- type: input
63+
id: chart-version
64+
attributes:
65+
label: Selenium Grid chart version (chart version)
66+
description: What version of Selenium Grid chart are you using?
67+
placeholder: 0.26.2?
68+
validations:
69+
required: false

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ updates:
66
interval: daily
77
time: '08:00'
88
open-pull-requests-limit: 99
9+
- package-ecosystem: docker
10+
directory: "/StandaloneChromium"
11+
schedule:
12+
interval: daily
13+
time: '08:00'
14+
open-pull-requests-limit: 99
915
- package-ecosystem: docker
1016
directory: "/StandaloneFirefox"
1117
schedule:
@@ -36,6 +42,12 @@ updates:
3642
interval: daily
3743
time: '08:00'
3844
open-pull-requests-limit: 99
45+
- package-ecosystem: docker
46+
directory: "/NodeChromium"
47+
schedule:
48+
interval: daily
49+
time: '08:00'
50+
open-pull-requests-limit: 99
3951
- package-ecosystem: docker
4052
directory: "/"
4153
schedule:

.github/workflows/build-test.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,31 @@ name: Build & test
22

33
on:
44
push:
5+
paths-ignore:
6+
- '.circleci/**'
57
pull_request:
8+
paths-ignore:
9+
- '.circleci/**'
610

711
permissions:
812
contents: read
913

1014
jobs:
1115
build-and-test:
12-
# Skip job based on the commit message, only works in push to branches for now
13-
if: contains(toJson(github.event.commits), '[skip ci]') == false
1416
name: Build & test Docker images with random user
15-
runs-on: ubuntu-20.04
17+
runs-on: ubuntu-latest
1618
strategy:
1719
matrix:
1820
use-random-user: [false, true]
1921
steps:
2022
- uses: actions/checkout@v4
2123
- name: Output Docker info
2224
run: docker info
23-
- name: Set up Python 3.8
24-
uses: actions/setup-python@v4.7.0
25+
- name: Set up Python
26+
uses: actions/setup-python@v5.0.0
2527
with:
26-
python-version: 3.8
28+
python-version: '3.11'
29+
check-latest: true
2730
- name: Get branch name (only for push to branch)
2831
if: github.event_name == 'push'
2932
run: echo "BRANCH=$(echo ${PUSH_BRANCH##*/})" >> $GITHUB_ENV
@@ -41,7 +44,11 @@ jobs:
4144
- name: Build Docker images
4245
run: VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make build
4346
- name: Test Docker images
44-
run: USE_RANDOM_USER_ID=${USE_RANDOM_USER} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make test
47+
uses: nick-invision/[email protected]
48+
with:
49+
timeout_minutes: 20
50+
max_attempts: 3
51+
command: |
52+
USE_RANDOM_USER_ID=${USE_RANDOM_USER} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make test
4553
env:
4654
USE_RANDOM_USER: ${{ matrix.use-random-user }}
47-

.github/workflows/deploy.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
# Only continue if the commit message has '[deploy]' in it
1111
if: contains(toJson(github.event.commits), '[deploy]') == true
1212
name: Deploy Docker images
13-
runs-on: ubuntu-20.04
13+
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout code
1616
uses: actions/checkout@v4
@@ -51,25 +51,25 @@ jobs:
5151
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
5252
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
5353
- name: Deploy new images
54-
uses: nick-invision/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd # v2
54+
uses: nick-invision/retry@14672906e672a08bd6eeb15720e9ed3ce869cdd4 # v2
5555
with:
5656
timeout_minutes: 20
5757
max_attempts: 3
5858
command: VERSION="${GRID_VERSION}" BUILD_DATE=${BUILD_DATE} make release
5959
- name: Tag images as latest
60-
uses: nick-invision/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd # v2
60+
uses: nick-invision/retry@14672906e672a08bd6eeb15720e9ed3ce869cdd4 # v2
6161
with:
6262
timeout_minutes: 20
6363
max_attempts: 3
6464
command: VERSION="${GRID_VERSION}" BUILD_DATE=${BUILD_DATE} make tag_latest
6565
- name: Deploy latest tag
66-
uses: nick-invision/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd # v2
66+
uses: nick-invision/retry@14672906e672a08bd6eeb15720e9ed3ce869cdd4 # v2
6767
with:
6868
timeout_minutes: 20
6969
max_attempts: 3
7070
command: VERSION="${GRID_VERSION}" BUILD_DATE=${BUILD_DATE} make release_latest
7171
- name: Tag browser images
72-
uses: nick-invision/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd # v2
72+
uses: nick-invision/retry@14672906e672a08bd6eeb15720e9ed3ce869cdd4 # v2
7373
with:
7474
timeout_minutes: 20
7575
max_attempts: 3
@@ -78,9 +78,9 @@ jobs:
7878
run: |
7979
git config --local user.email "[email protected]"
8080
git config --local user.name "Selenium CI Bot"
81-
git commit -m "Update tag in docs and files [skip ci]" -a
81+
git commit -m "Update tag in docs and files" -a
8282
- name: Push changes
83-
uses: ad-m/github-push-action@40bf560936a8022e68a3c00e7d2abefaf01305a6 # master
83+
uses: ad-m/github-push-action@master
8484
with:
8585
github_token: ${{ secrets.SELENIUM_CI_TOKEN }}
8686
branch: trunk

.github/workflows/helm-chart-release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- trunk
77
paths:
88
- 'charts/selenium-grid/Chart.yaml'
9+
workflow_dispatch:
910

1011
jobs:
1112
release:
@@ -23,6 +24,6 @@ jobs:
2324
git config user.email "[email protected]"
2425
2526
- name: Run chart-releaser
26-
uses: helm/chart-releaser-action@v1.5.0
27+
uses: helm/chart-releaser-action@v1.6.0
2728
env:
2829
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/helm-chart-test.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Lint and Test Helm Charts
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- '.circleci/**'
7+
pull_request:
8+
paths-ignore:
9+
- '.circleci/**'
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
build-and-test:
17+
name: Test Helm charts
18+
runs-on: ubuntu-latest
19+
strategy:
20+
matrix:
21+
test-strategy: [chart_test, chart_test_parallel_autoscaling]
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Output Docker info
25+
run: docker info
26+
- name: Set up Python
27+
uses: actions/[email protected]
28+
with:
29+
python-version: '3.11'
30+
check-latest: true
31+
- name: Get branch name (only for push to branch)
32+
if: github.event_name == 'push'
33+
run: echo "BRANCH=$(echo ${PUSH_BRANCH##*/})" >> $GITHUB_ENV
34+
env:
35+
PUSH_BRANCH: ${{ github.ref }}
36+
- name: Get target branch name (only for PRs)
37+
if: github.event_name == 'pull_request'
38+
run: echo "BRANCH=$(echo ${TARGET_BRANCH##*/})" >> $GITHUB_ENV
39+
env:
40+
TARGET_BRANCH: ${{ github.head_ref }}
41+
- name: Output branch name
42+
run: echo ${BRANCH}
43+
- name: Sets build date
44+
run: |
45+
echo "BUILD_DATE=$(date '+%Y%m%d')" >> $GITHUB_ENV
46+
echo "IMAGE_REGISTRY=artifactory/selenium" >> $GITHUB_ENV
47+
- name: Setup Kubernetes environment
48+
run: make chart_setup_env
49+
- name: Build Docker images
50+
run: NAME=${IMAGE_REGISTRY} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make build
51+
- name: Build and lint charts
52+
run: |
53+
BUILD_DATE=${BUILD_DATE} make chart_build
54+
echo "CHART_PACKAGE_PATH=$(cat /tmp/selenium_chart_version)" >> $GITHUB_ENV
55+
echo "CHART_FILE_NAME=$(basename $(cat /tmp/selenium_chart_version))" >> $GITHUB_ENV
56+
- name: Setup Kubernetes cluster
57+
run: NAME=${IMAGE_REGISTRY} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make chart_cluster_setup
58+
- name: Test Selenium Grid on Kubernetes
59+
uses: nick-invision/[email protected]
60+
with:
61+
timeout_minutes: 30
62+
max_attempts: 3
63+
command: |
64+
NAME=${IMAGE_REGISTRY} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make ${{ matrix.test-strategy }}
65+
- name: Cleanup Kubernetes cluster
66+
if: always()
67+
run: make chart_cluster_cleanup
68+
- name: Upload Helm chart package
69+
if: always()
70+
uses: actions/upload-artifact@v4
71+
with:
72+
name: ${{ matrix.test-strategy }}_${{ env.CHART_FILE_NAME }}
73+
path: ${{ env.CHART_PACKAGE_PATH }}
74+
- name: Upload Helm chart template rendered
75+
if: always()
76+
uses: actions/upload-artifact@v4
77+
with:
78+
name: ${{ matrix.test-strategy }}_chart_template_rendered.yaml
79+
path: ./tests/tests/output_deployment.yaml
80+
if-no-files-found: ignore

.github/workflows/label-commenter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ permissions:
1111

1212
jobs:
1313
comment:
14-
runs-on: ubuntu-20.04
14+
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v4
1717
- name: Label Commenter

.github/workflows/lock.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ jobs:
1414
action:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: dessant/lock-threads@be8aa5be94131386884a6da4189effda9b14aa21 # v3
17+
- uses: dessant/lock-threads@v5
1818
with:
1919
process-only: 'issues'
20-
issue-lock-inactive-days: '30'
20+
issue-inactive-days: '30'
2121
issue-lock-reason: ''
22-
issue-lock-comment: >
22+
issue-comment: >
2323
This issue has been automatically locked since there
2424
has not been any recent activity after it was closed.
2525
Please open a new issue for related bugs.

.github/workflows/scan-dockerfile.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Scan Dockerfile vulnerabilities
2+
3+
on:
4+
push:
5+
paths:
6+
- '**/Dockerfile'
7+
pull_request:
8+
paths:
9+
- '**/Dockerfile'
10+
workflow_dispatch:
11+
schedule:
12+
- cron: '0 0 * * *'
13+
14+
jobs:
15+
build-and-scan:
16+
name: Scan Dockerfile vulnerabilities
17+
permissions: write-all
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: Set severity for PRs
22+
if: github.event_name == 'pull_request' || github.event_name == 'push'
23+
run: |
24+
echo "SEVERITY=HIGH,CRITICAL" >> $GITHUB_ENV
25+
echo "EXIT_CODE=1" >> $GITHUB_ENV
26+
- name: Set severity for others
27+
if: github.event_name != 'pull_request' && github.event_name != 'push'
28+
run: |
29+
echo "SEVERITY=LOW,MEDIUM,HIGH,CRITICAL" >> $GITHUB_ENV
30+
echo "EXIT_CODE=0" >> $GITHUB_ENV
31+
- name: Scan source code
32+
uses: aquasecurity/trivy-action@master
33+
with:
34+
scan-type: 'fs'
35+
scan-ref: '.'
36+
format: 'sarif'
37+
output: 'source-results.sarif'
38+
scanners: 'vuln,secret,misconfig'
39+
skip-dirs: 'tests,Video'
40+
exit-code: '${{ env.EXIT_CODE }}'
41+
severity: '${{ env.SEVERITY }}'
42+
limit-severities-for-sarif: true
43+
- name: Upload source scan results to annotations
44+
if: always()
45+
uses: Ayrx/sarif_to_github_annotations@master
46+
with:
47+
sarif_file: 'source-results.sarif'
48+
- name: Upload source scan results to GitHub Security tab
49+
if: github.event_name != 'pull_request'
50+
uses: github/codeql-action/upload-sarif@v3
51+
with:
52+
sarif_file: 'source-results.sarif'
53+
category: source-results

0 commit comments

Comments
 (0)