Skip to content

Commit 522714c

Browse files
committed
[build][test]: Release docker images for aarch64 platform
Signed-off-by: Viet Nguyen Duc <[email protected]>
1 parent c082aed commit 522714c

Some content is hidden

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

50 files changed

+967
-1833
lines changed

.circleci/config.yml

+161-348
Large diffs are not rendered by default.

.github/ISSUE_TEMPLATE/bug_report.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,6 @@ body:
6464
attributes:
6565
label: Selenium Grid chart version (chart version)
6666
description: What version of Selenium Grid chart are you using?
67-
placeholder: 0.29.1?
67+
placeholder: 0.30.0?
6868
validations:
6969
required: false

.github/workflows/build-test-multi-arch.yml

-59
This file was deleted.

.github/workflows/build-test.yml

+1-67
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ on:
1616
paths-ignore:
1717
- '**.md'
1818

19-
permissions:
20-
contents: read
19+
permissions: write-all
2120

2221
jobs:
2322
docker-test:
@@ -29,68 +28,3 @@ jobs:
2928
uses: ./.github/workflows/helm-chart-test.yml
3029
with:
3130
release: ${{ inputs.release == 'true' }}
32-
33-
build-and-test:
34-
name: Build & test Docker images with random user
35-
runs-on: ubuntu-latest
36-
strategy:
37-
fail-fast: false
38-
matrix:
39-
use-random-user: [false, true]
40-
steps:
41-
- uses: actions/checkout@main
42-
- name: Set up QEMU
43-
uses: docker/setup-qemu-action@master
44-
- name: Set up Docker Buildx
45-
uses: docker/setup-buildx-action@master
46-
with:
47-
platforms: linux/amd64,linux/arm64
48-
use: false
49-
- name: Output Docker info
50-
run: docker info
51-
- name: Set up Python
52-
uses: actions/setup-python@main
53-
with:
54-
python-version: '3.11'
55-
check-latest: true
56-
- name: Get branch name (only for push to branch)
57-
if: github.event_name == 'push'
58-
run: echo "BRANCH=$(echo ${PUSH_BRANCH##*/})" >> $GITHUB_ENV
59-
env:
60-
PUSH_BRANCH: ${{ github.ref }}
61-
- name: Get target branch name (only for PRs)
62-
if: github.event_name == 'pull_request'
63-
run: echo "BRANCH=$(echo ${TARGET_BRANCH##*/})" >> $GITHUB_ENV
64-
env:
65-
TARGET_BRANCH: ${{ github.head_ref }}
66-
- name: Output branch name
67-
run: echo ${BRANCH}
68-
- name: Set Selenium base version
69-
if: inputs.release != 'true'
70-
run: |
71-
make set_build_nightly
72-
cat .env | xargs -I {} echo {} >> $GITHUB_ENV
73-
- name: Sets build date
74-
run: |
75-
echo "BUILD_DATE=$(date '+%Y%m%d')" >> $GITHUB_ENV
76-
echo "AUTHORS=${AUTHORS}" >> $GITHUB_ENV
77-
env:
78-
AUTHORS: ${{ vars.AUTHORS || 'SeleniumHQ' }}
79-
- name: Build Docker images
80-
uses: nick-invision/retry@master
81-
with:
82-
timeout_minutes: 12
83-
max_attempts: 3
84-
retry_wait_seconds: 60
85-
command: VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make build
86-
- name: Count image layers
87-
run: VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make count_image_layers
88-
- name: Test Docker images
89-
uses: nick-invision/retry@master
90-
with:
91-
timeout_minutes: 20
92-
max_attempts: 3
93-
command: |
94-
USE_RANDOM_USER_ID=${USE_RANDOM_USER} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make test
95-
env:
96-
USE_RANDOM_USER: ${{ matrix.use-random-user }}

.github/workflows/deploy.yml

+18-12
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,26 @@ on:
88
required: false
99
type: boolean
1010
default: false
11+
skip-test:
12+
description: 'Skip the tests'
13+
required: false
14+
type: boolean
15+
default: false
1116
push:
1217
branches:
1318
- trunk
1419

1520
jobs:
1621
build-test:
17-
if: contains(toJson(github.event.commits), '[deploy]') == true || github.event_name == 'workflow_dispatch'
22+
if: contains(toJson(github.event.commits), '[deploy]') == true || (github.event_name == 'workflow_dispatch' && github.event.inputs.skip-test == 'false')
1823
uses: ./.github/workflows/build-test.yml
1924
with:
2025
release: ${{ github.event.inputs.release == 'true' }}
2126

2227
deploy:
2328
needs:
2429
- build-test
25-
if: contains(toJson(github.event.commits), '[deploy]') || (github.event_name == 'workflow_dispatch' && github.event.inputs.release == 'true')
30+
if: contains(toJson(github.event.commits), '[deploy]') || (github.event_name == 'workflow_dispatch' && github.event.inputs.release == 'true' && !failure() && !cancelled())
2631
name: Deploy Docker images
2732
runs-on: ubuntu-latest
2833
permissions: write-all
@@ -32,19 +37,22 @@ jobs:
3237
with:
3338
persist-credentials: false
3439
fetch-depth: 0
35-
- name: Set up QEMU
36-
uses: docker/setup-qemu-action@master
37-
- name: Set up Docker Buildx
38-
uses: docker/setup-buildx-action@master
40+
- name: Set up containerd image store feature
41+
uses: nick-invision/retry@master
3942
with:
40-
platforms: linux/amd64,linux/arm64
41-
use: false
43+
timeout_minutes: 10
44+
max_attempts: 3
45+
command: |
46+
make chart_setup_env
47+
make set_containerd_image_store
4248
- name: Output Docker info
4349
run: docker info
4450
- name: Sets build date
4551
run: |
4652
echo "BUILD_DATE=$(date '+%Y%m%d')" >> $GITHUB_ENV
4753
echo "NAME=${NAMESPACE}" >> $GITHUB_ENV
54+
make set_build_multiarch
55+
cat .env | xargs -I {} echo {} >> $GITHUB_ENV
4856
env:
4957
NAMESPACE: ${{ vars.DOCKER_NAMESPACE || 'selenium' }}
5058
AUTHORS: ${{ vars.AUTHORS || 'SeleniumHQ' }}
@@ -60,8 +68,6 @@ jobs:
6068
if: contains(toJson(github.event.commits), '[prerelease]') == true
6169
- name: Display Grid version
6270
run: echo ${GRID_VERSION}
63-
- name: Remove local Docker tag
64-
run: docker rmi ${NAME}/base:local-${BUILD_DATE}
6571
- name: Sets env var for the next tag
6672
run: echo "NEXT_TAG=${GRID_VERSION}-${BUILD_DATE}" >> $GITHUB_ENV
6773
- name: Get latest tag
@@ -75,10 +81,10 @@ jobs:
7581
- name: Build images
7682
uses: nick-invision/retry@master
7783
with:
78-
timeout_minutes: 12
84+
timeout_minutes: 45
7985
max_attempts: 3
8086
retry_wait_seconds: 60
81-
command: VERSION="${GRID_VERSION}" BUILD_DATE=${BUILD_DATE} make build
87+
command: PLATFORMS="${PLATFORMS}" VERSION="${GRID_VERSION}" BUILD_DATE=${BUILD_DATE} make build
8288
- name: Login Docker Hub
8389
run: docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
8490
env:

.github/workflows/docker-test.yml

+42-9
Original file line numberDiff line numberDiff line change
@@ -34,25 +34,45 @@ jobs:
3434
fail-fast: false
3535
matrix:
3636
include:
37+
- test-strategy: test
38+
use-random-user: true
39+
test-video: false
40+
build-all: true
41+
- test-strategy: test
42+
use-random-user: false
43+
test-video: false
44+
build-all: true
3745
- test-strategy: test_video
46+
use-random-user: false
3847
test-video: true
48+
build-all: false
3949
- test-strategy: test_video_dynamic_name
50+
use-random-user: false
4051
test-video: true
52+
build-all: false
4153
- test-strategy: test_node_docker
54+
use-random-user: false
4255
test-video: true
56+
build-all: false
4357
- test-strategy: test_parallel
58+
use-random-user: false
4459
test-video: false
60+
build-all: false
4561
- test-strategy: test_node_relay
62+
use-random-user: false
4663
test-video: false
64+
build-all: false
4765
steps:
48-
- uses: actions/checkout@main
49-
- name: Set up QEMU
50-
uses: docker/setup-qemu-action@master
51-
- name: Set up Docker Buildx
52-
uses: docker/setup-buildx-action@master
66+
- name: Checkout code
67+
uses: actions/checkout@main
68+
- name: Set up containerd image store feature
69+
uses: nick-invision/retry@master
5370
with:
54-
platforms: linux/amd64,linux/arm64
55-
use: false
71+
timeout_minutes: 10
72+
max_attempts: 3
73+
command: |
74+
make chart_setup_env
75+
make set_containerd_image_store
5676
- name: Output Docker info
5777
run: docker info
5878
- name: Set up Python
@@ -89,10 +109,20 @@ jobs:
89109
echo "AUTHORS=${AUTHORS}" >> $GITHUB_ENV
90110
env:
91111
AUTHORS: ${{ vars.AUTHORS || 'SeleniumHQ' }}
112+
- name: Build Docker images
113+
uses: nick-invision/retry@master
114+
if: matrix.build-all == true
115+
with:
116+
timeout_minutes: 20
117+
max_attempts: 3
118+
retry_wait_seconds: 60
119+
command: |
120+
VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make build
92121
- name: Pre-build to reduce logs in test phase
93122
uses: nick-invision/retry@master
123+
if: matrix.build-all != true
94124
with:
95-
timeout_minutes: 12
125+
timeout_minutes: 20
96126
max_attempts: 3
97127
retry_wait_seconds: 60
98128
command: |
@@ -111,10 +141,13 @@ jobs:
111141
TEST_PARALLEL_HARDENING: ${{ github.event.inputs.parallel-hardening || 'true' }}
112142
REQUEST_TIMEOUT: ${{ github.event.inputs.request-timeout || '400' }}
113143
- name: Run Docker Compose to ${{ matrix.test-strategy }}
114-
run: USE_RANDOM_USER_ID=${USE_RANDOM_USER} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make ${{ matrix.test-strategy }}
144+
run: USE_RANDOM_USER_ID=${{ matrix.use-random-user }} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make ${{ matrix.test-strategy }}
115145
- name: Upload recorded video
116146
if: matrix.test-video == true
117147
uses: actions/upload-artifact@main
118148
with:
119149
name: "${{ matrix.test-strategy }}_artifacts"
120150
path: ./tests/videos/
151+
- name: Clean up Docker
152+
if: always()
153+
run: docker system prune -af

0 commit comments

Comments
 (0)