-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
175 lines (171 loc) · 6.87 KB
/
release-chrome-versions.yml
File metadata and controls
175 lines (171 loc) · 6.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
name: Deploy specific Chrome version
on:
workflow_dispatch:
inputs:
stable:
description: 'Use upstream stable build'
required: true
type: string
default: 'true'
reuse-base:
description: 'Reuse base image to build'
required: false
type: boolean
default: true
grid-version:
description: 'Grid version to build. E.g: 4.28.1. Must provide if reusing base image'
required: false
type: string
default: ''
build-date:
description: 'Build date in format YYYYMMDD. Must provide if reusing base image'
required: false
type: string
default: '20260404'
browser-name:
description: 'Browser name to build. E.g: chrome'
required: true
type: string
default: 'chrome'
browser-versions:
description: 'List browser version to build. E.g: [130, 131]'
required: true
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, 143, 144, 145, 146, 147]'
push-image:
description: 'Push image after testing successfully'
required: true
type: boolean
default: false
pr-changelog:
description: 'Create a PR for CHANGELOG'
required: true
type: boolean
default: true
env:
GRID_VERSION: ${{ github.event.inputs.grid-version }}
BROWSER_NAME: ${{ github.event.inputs.browser-name }}
REUSE_BASE: ${{ github.event.inputs.reuse-base || true }}
BUILD_DATE: ${{ github.event.inputs.build-date || '' }}
NAMESPACE: ${{ vars.DOCKER_NAMESPACE || 'selenium' }}
AUTHORS: ${{ vars.AUTHORS || github.repository_owner }}
PUSH_IMAGE: ${{ github.event.inputs.push-image || false }}
PR_CHANGELOG: ${{ github.event.inputs.pr-changelog || true }}
RUN_ID: ${{ github.run_id }}
jobs:
deploy:
name: Node/Standalone Chrome
runs-on: ubuntu-24.04
permissions: write-all
strategy:
fail-fast: false
max-parallel: 10
matrix:
browser-version: ${{ fromJSON(github.event.inputs.browser-versions)}}
outputs:
GRID_VERSION: ${{ steps.display_grid_version.outputs.GRID_VERSION }}
steps:
- name: Checkout code
uses: actions/checkout@main
with:
persist-credentials: false
fetch-depth: 0
- name: Set up containerd image store feature
uses: nick-invision/retry@master
with:
timeout_minutes: 10
max_attempts: 3
command: |
INSTALL_DOCKER=false make setup_dev_env
- name: Output Docker info
run: docker info
- name: Set Selenium base version
uses: ./.github/actions/get-latest-upstream
with:
release: ${{ github.event.inputs.stable || true }}
gh_cli_token: ${{ secrets.GITHUB_TOKEN }}
authors: ${{ vars.AUTHORS || github.repository_owner }}
- name: Sets build date
run: |
if [ -z "${BUILD_DATE}" ]; then
echo "BUILD_DATE=$(date '+%Y%m%d')" >> $GITHUB_ENV
else
echo "BUILD_DATE=${BUILD_DATE}" >> $GITHUB_ENV
fi
echo "NAME=${NAMESPACE}" >> $GITHUB_ENV
echo "BROWSER_VERSION=${BROWSER_VERSION}" >> $GITHUB_ENV
env:
BROWSER_VERSION: ${{ matrix.browser-version }}
- name: Get Grid version
if: env.GRID_VERSION == ''
run: |
echo ${BASE_VERSION}
echo "GRID_VERSION=${BASE_VERSION}" >> $GITHUB_ENV
- name: Display Grid version
id: display_grid_version
run: |
echo ${GRID_VERSION}
echo "GRID_VERSION=${GRID_VERSION}" >> "$GITHUB_OUTPUT"
- name: Login Docker Hub
run: docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
env:
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
- name: Login GitHub Container Registry
if: env.PUSH_IMAGE == 'true'
run: echo "${{ secrets.SELENIUM_CI_TOKEN }}" | docker login ghcr.io -u "${{ secrets.SELENIUM_CI_USERNAME }}" --password-stdin
- name: Build images with Grid core ${{ env.GRID_VERSION }} and ${{ env.BROWSER_NAME }} v${{ env.BROWSER_VERSION }}
uses: nick-invision/retry@master
with:
timeout_minutes: 20
max_attempts: 3
retry_wait_seconds: 60
command: |
make update_browser_versions_matrix
./tests/build-backward-compatible/bootstrap.sh ${GRID_VERSION} ${BROWSER_VERSION} ${BROWSER_NAME} ${REUSE_BASE}
EXIT_CODE=$?
cat .env | xargs -I {} echo {} >> $GITHUB_ENV
exit $EXIT_CODE
- name: Build Hub image for testing
if: env.REUSE_BASE == 'false'
run: make hub
- name: Test images Node with Grid core ${{ env.GRID_VERSION }} and ${{ env.BROWSER_NAME }} v${{ env.BROWSER_VERSION }}
uses: nick-invision/retry@master
with:
timeout_minutes: 20
max_attempts: 3
retry_wait_seconds: 60
command: |
make test_chrome
- name: Test images Standalone with Grid core ${{ env.GRID_VERSION }} and ${{ env.BROWSER_NAME }} v${{ env.BROWSER_VERSION }}
uses: nick-invision/retry@master
with:
timeout_minutes: 20
max_attempts: 3
retry_wait_seconds: 60
command: |
make test_chrome_standalone \
&& make test_chrome_standalone_java
- name: Push images with Grid core ${{ env.GRID_VERSION }} and ${{ env.BROWSER_NAME }} v${{ env.BROWSER_VERSION }}
if: env.PUSH_IMAGE == 'true'
run: |
./tests/build-backward-compatible/bootstrap.sh ${GRID_VERSION} ${BROWSER_VERSION} ${BROWSER_NAME} ${REUSE_BASE} true true
- name: Mirror images to GHCR
if: env.PUSH_IMAGE == 'true'
run: GHCR_NAMESPACE="ghcr.io/$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" BROWSER_NAME="${BROWSER_NAME}" make mirror_browser_images_ghcr
- name: Upload changelog
if: always()
uses: actions/upload-artifact@main
with:
name: image_tags_${{ env.GRID_VERSION }}_${{ env.BROWSER_NAME }}_${{ env.BROWSER_VERSION }}
path: ./CHANGELOG/${{ env.GRID_VERSION }}/${{ env.BROWSER_NAME }}_${{ env.BROWSER_VERSION }}.md
if-no-files-found: ignore
pr-results:
if: (!failure() && !cancelled() && (github.event.inputs.pr-changelog == 'true'))
uses: ./.github/workflows/create-changelog-pr.yml
needs: deploy
with:
grid-version: ${{ needs.deploy.outputs.GRID_VERSION }}
browser-name: ${{ github.event.inputs.browser-name }}
browser-versions: ${{ github.event.inputs.browser-versions }}
run-id: ${{ github.run_id }}
secrets: inherit