Skip to content

Commit 1866f17

Browse files
authored
Docker: Build Node/Standalone includes browser ChromeForTesting (#3014)
1 parent 48c79bd commit 1866f17

17 files changed

+648
-20
lines changed

.github/workflows/release-all-browser-versions.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,27 @@ jobs:
5151
}
5252
});
5353
54+
dispatch-chrome-for-testing:
55+
runs-on: ubuntu-latest
56+
steps:
57+
- name: Dispatch Chrome for Testing versions
58+
uses: actions/github-script@v8
59+
with:
60+
script: |
61+
await github.rest.actions.createWorkflowDispatch({
62+
owner: context.repo.owner,
63+
repo: context.repo.repo,
64+
workflow_id: 'release-chrome-for-testing-versions.yml',
65+
ref: context.ref,
66+
inputs: {
67+
'stable': '${{ github.event.inputs.stable }}',
68+
'reuse-base': '${{ github.event.inputs.reuse-base }}',
69+
'grid-version': '${{ github.event.inputs.grid-version }}',
70+
'push-image': '${{ github.event.inputs.push-image }}',
71+
'pr-changelog': '${{ github.event.inputs.pr-changelog }}'
72+
}
73+
});
74+
5475
dispatch-edge:
5576
runs-on: ubuntu-latest
5677
steps:
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
name: Deploy specific Chrome for Testing version
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
stable:
7+
description: 'Use upstream stable build'
8+
required: true
9+
type: string
10+
default: 'true'
11+
reuse-base:
12+
description: 'Reuse base image to build'
13+
required: false
14+
type: boolean
15+
default: true
16+
grid-version:
17+
description: 'Grid version to build. E.g: 4.28.1. Must provide if reusing base image'
18+
required: false
19+
type: string
20+
default: ''
21+
build-date:
22+
description: 'Build date in format YYYYMMDD. Must provide if reusing base image'
23+
required: false
24+
type: string
25+
default: '20251025'
26+
browser-name:
27+
description: 'Browser name to build. E.g: chrome-for-testing'
28+
required: true
29+
type: string
30+
default: 'chrome-for-testing'
31+
browser-versions:
32+
description: 'List browser version to build. E.g: [130, 131]'
33+
required: true
34+
default: '[113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142]'
35+
push-image:
36+
description: 'Push image after testing successfully'
37+
required: true
38+
type: boolean
39+
default: false
40+
pr-changelog:
41+
description: 'Create a PR for CHANGELOG'
42+
required: true
43+
type: boolean
44+
default: true
45+
46+
env:
47+
GRID_VERSION: ${{ github.event.inputs.grid-version }}
48+
BROWSER_NAME: ${{ github.event.inputs.browser-name }}
49+
REUSE_BASE: ${{ github.event.inputs.reuse-base || true }}
50+
BUILD_DATE: ${{ github.event.inputs.build-date || '' }}
51+
NAMESPACE: ${{ vars.DOCKER_NAMESPACE || 'selenium' }}
52+
AUTHORS: ${{ vars.AUTHORS || 'SeleniumHQ' }}
53+
PUSH_IMAGE: ${{ github.event.inputs.push-image || false }}
54+
PR_CHANGELOG: ${{ github.event.inputs.pr-changelog || true }}
55+
RUN_ID: ${{ github.run_id }}
56+
57+
jobs:
58+
deploy:
59+
name: Node/Standalone Chrome for Testing
60+
runs-on: ubuntu-24.04
61+
permissions: write-all
62+
strategy:
63+
fail-fast: false
64+
max-parallel: 10
65+
matrix:
66+
browser-version: ${{ fromJSON(github.event.inputs.browser-versions)}}
67+
outputs:
68+
GRID_VERSION: ${{ steps.display_grid_version.outputs.GRID_VERSION }}
69+
steps:
70+
- name: Checkout code
71+
uses: actions/checkout@main
72+
with:
73+
persist-credentials: false
74+
fetch-depth: 0
75+
- name: Set up containerd image store feature
76+
uses: nick-invision/retry@master
77+
with:
78+
timeout_minutes: 10
79+
max_attempts: 3
80+
command: |
81+
INSTALL_DOCKER=false make setup_dev_env
82+
- name: Output Docker info
83+
run: docker info
84+
- name: Set Selenium base version
85+
uses: ./.github/actions/get-latest-upstream
86+
with:
87+
release: ${{ github.event.inputs.stable || true }}
88+
gh_cli_token: ${{ secrets.GITHUB_TOKEN }}
89+
- name: Sets build date
90+
run: |
91+
if [ -z "${BUILD_DATE}" ]; then
92+
echo "BUILD_DATE=$(date '+%Y%m%d')" >> $GITHUB_ENV
93+
else
94+
echo "BUILD_DATE=${BUILD_DATE}" >> $GITHUB_ENV
95+
fi
96+
echo "NAME=${NAMESPACE}" >> $GITHUB_ENV
97+
echo "BROWSER_VERSION=${BROWSER_VERSION}" >> $GITHUB_ENV
98+
env:
99+
BROWSER_VERSION: ${{ matrix.browser-version }}
100+
- name: Get Grid version
101+
if: env.GRID_VERSION == ''
102+
run: |
103+
echo ${BASE_VERSION}
104+
echo "GRID_VERSION=${BASE_VERSION}" >> $GITHUB_ENV
105+
- name: Display Grid version
106+
id: display_grid_version
107+
run: |
108+
echo ${GRID_VERSION}
109+
echo "GRID_VERSION=${GRID_VERSION}" >> "$GITHUB_OUTPUT"
110+
- name: Login Docker Hub
111+
run: docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
112+
env:
113+
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
114+
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
115+
- name: Build images with Grid core ${{ env.GRID_VERSION }} and ${{ env.BROWSER_NAME }} v${{ env.BROWSER_VERSION }}
116+
uses: nick-invision/retry@master
117+
with:
118+
timeout_minutes: 20
119+
max_attempts: 3
120+
retry_wait_seconds: 60
121+
command: |
122+
make update_browser_versions_matrix
123+
./tests/build-backward-compatible/bootstrap.sh ${GRID_VERSION} ${BROWSER_VERSION} ${BROWSER_NAME} ${REUSE_BASE}
124+
EXIT_CODE=$?
125+
cat .env | xargs -I {} echo {} >> $GITHUB_ENV
126+
exit $EXIT_CODE
127+
- name: Build Hub image for testing
128+
if: env.REUSE_BASE == 'false'
129+
run: make hub
130+
- name: Test images Node with Grid core ${{ env.GRID_VERSION }} and ${{ env.BROWSER_NAME }} v${{ env.BROWSER_VERSION }}
131+
uses: nick-invision/retry@master
132+
with:
133+
timeout_minutes: 20
134+
max_attempts: 3
135+
retry_wait_seconds: 60
136+
command: |
137+
make test_chrome
138+
- name: Test images Standalone with Grid core ${{ env.GRID_VERSION }} and ${{ env.BROWSER_NAME }} v${{ env.BROWSER_VERSION }}
139+
uses: nick-invision/retry@master
140+
with:
141+
timeout_minutes: 20
142+
max_attempts: 3
143+
retry_wait_seconds: 60
144+
command: |
145+
make test_chrome_standalone \
146+
&& make test_chrome_standalone_java
147+
- name: Push images with Grid core ${{ env.GRID_VERSION }} and ${{ env.BROWSER_NAME }} v${{ env.BROWSER_VERSION }}
148+
if: env.PUSH_IMAGE == 'true'
149+
run: |
150+
./tests/build-backward-compatible/bootstrap.sh ${GRID_VERSION} ${BROWSER_VERSION} ${BROWSER_NAME} ${REUSE_BASE} true true
151+
- name: Upload changelog
152+
if: always()
153+
uses: actions/upload-artifact@main
154+
with:
155+
name: image_tags_${{ env.GRID_VERSION }}_${{ env.BROWSER_NAME }}_${{ env.BROWSER_VERSION }}
156+
path: ./CHANGELOG/${{ env.GRID_VERSION }}/${{ env.BROWSER_NAME }}_${{ env.BROWSER_VERSION }}.md
157+
if-no-files-found: ignore
158+
159+
pr-results:
160+
if: (!failure() && !cancelled() && (github.event.inputs.pr-changelog == 'true'))
161+
uses: ./.github/workflows/create-changelog-pr.yml
162+
needs: deploy
163+
with:
164+
grid-version: ${{ needs.deploy.outputs.GRID_VERSION }}
165+
browser-name: ${{ github.event.inputs.browser-name }}
166+
browser-versions: ${{ github.event.inputs.browser-versions }}
167+
run-id: ${{ github.run_id }}
168+
secrets: inherit

.github/workflows/release-chrome-versions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ on:
3131
browser-versions:
3232
description: 'List browser version to build. E.g: [130, 131]'
3333
required: true
34-
default: '[95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141]'
34+
default: '[95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142]'
3535
push-image:
3636
description: 'Push image after testing successfully'
3737
required: true

.github/workflows/release-edge-versions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ on:
3131
browser-versions:
3232
description: 'List browser version to build. E.g: [130, 131]'
3333
required: true
34-
default: '[114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140]'
34+
default: '[114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141]'
3535
push-image:
3636
description: 'Push image after testing successfully'
3737
required: true

.github/workflows/release-firefox-versions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ on:
3131
browser-versions:
3232
description: 'List browser version to build. E.g: [130, 131]'
3333
required: true
34-
default: '[98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143]'
34+
default: '[98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144]'
3535
push-image:
3636
description: 'Push image after testing successfully'
3737
required: true

.github/workflows/update-dev-beta-browser-images.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,25 @@ jobs:
2929
strategy:
3030
fail-fast: false
3131
matrix:
32-
browser: [chrome,firefox,edge]
33-
channel: [dev,beta]
32+
include:
33+
- browser: chrome
34+
channel: dev
35+
- browser: chrome
36+
channel: beta
37+
- browser: firefox
38+
channel: dev
39+
- browser: firefox
40+
channel: beta
41+
- browser: edge
42+
channel: dev
43+
- browser: edge
44+
channel: beta
45+
- browser: chrome-for-testing
46+
channel: dev
47+
- browser: chrome-for-testing
48+
channel: beta
49+
- browser: chrome-for-testing
50+
channel: canary
3451
env:
3552
NAME: ${{ vars.DOCKER_NAMESPACE || 'selenium' }}
3653
BROWSER: ${{ matrix.browser }}

0 commit comments

Comments
 (0)