File tree Expand file tree Collapse file tree 9 files changed +79
-25
lines changed
actions/get-latest-upstream Expand file tree Collapse file tree 9 files changed +79
-25
lines changed Original file line number Diff line number Diff line change @@ -231,6 +231,7 @@ jobs:
231
231
BUILD_DATE=${BUILD_DATE} TEST_EXISTING_KEDA=${TEST_EXISTING_KEDA} make chart_cluster_setup
232
232
- run :
233
233
name : " Build Docker images"
234
+ no_output_timeout : 30m
234
235
command : |
235
236
N=3
236
237
while [ $N -gt 0 ]; do
@@ -254,6 +255,7 @@ jobs:
254
255
source $BASH_ENV
255
256
- run :
256
257
name : " Test Selenium Grid on Kubernetes"
258
+ no_output_timeout : 30m
257
259
command : |
258
260
N=3
259
261
while [ $N -gt 0 ]; do
Original file line number Diff line number Diff line change
1
+ name : Get Latest Upstream
2
+ description : Get the latest upstream release of Selenium
3
+ inputs :
4
+ release :
5
+ description : ' Test a new release process'
6
+ required : false
7
+ type : boolean
8
+ default : false
9
+ gh_cli_token :
10
+ description : ' GitHub CLI authentication token'
11
+ required : true
12
+ type : secret
13
+
14
+ runs :
15
+ using : " composite"
16
+ steps :
17
+ - name : Get latest upstream
18
+ shell : bash
19
+ run : |
20
+ sudo apt update
21
+ sudo apt install gh
22
+ echo "${{ inputs.gh_cli_token }}" | gh auth login --with-token
23
+ if [ "${{ inputs.release }}" = "true" ]; then
24
+ echo "Getting the latest stable release."
25
+ RELEASE=$(gh release list -R SeleniumHQ/selenium | grep -v nightly | awk '{ print $4 }' | head -1)
26
+ else
27
+ echo "Getting the latest Nightly release."
28
+ RELEASE=$(gh release list -R SeleniumHQ/selenium | grep nightly | awk '{ print $3 }' | head -1)
29
+ if [ -z "${RELEASE}" ]; then
30
+ echo "Nightly release not found, getting the latest stable release."
31
+ RELEASE=$(gh release list -R SeleniumHQ/selenium | grep -v nightly | awk '{ print $4 }' | head -1)
32
+ fi
33
+ fi
34
+ jar_file=$(gh release view -R SeleniumHQ/selenium ${RELEASE} | grep jar | awk '{ print $2 }' | tail -n 1)
35
+ echo "Server package: ${jar_file}"
36
+ VERSION=$(echo $jar_file | sed 's/selenium-server-//;s/\.jar//')
37
+ echo "BASE_RELEASE=${RELEASE} | BASE_VERSION=${VERSION} | VERSION=${VERSION}"
38
+ echo "BASE_RELEASE=${RELEASE}" >> $GITHUB_ENV
39
+ echo "BASE_VERSION=${VERSION}" >> $GITHUB_ENV
40
+ echo "VERSION=${VERSION}" >> $GITHUB_ENV
Original file line number Diff line number Diff line change 6
6
release :
7
7
description : ' Test a new release process'
8
8
required : false
9
- type : boolean
10
- default : false
9
+ type : string
10
+ default : ' false'
11
11
workflow_dispatch :
12
12
inputs :
13
13
rerunFailedOnly :
32
32
33
33
jobs :
34
34
docker-test :
35
+ name : Test Seleium Grid on Docker
35
36
uses : ./.github/workflows/docker-test.yml
36
37
with :
37
38
release : ${{ inputs.release == 'true' }}
38
39
39
40
helm-chart-test :
41
+ name : Test Selenium Grid on Kubernetes
40
42
uses : ./.github/workflows/helm-chart-test.yml
41
43
with :
42
44
release : ${{ inputs.release == 'true' }}
43
45
44
46
rerun-workflow-when-failure :
47
+ name : Rerun workflow when failure
45
48
needs :
46
49
- docker-test
47
50
- helm-chart-test
Original file line number Diff line number Diff line change 6
6
release :
7
7
description : ' Deploy a new release'
8
8
required : false
9
- type : boolean
10
- default : false
9
+ type : string
10
+ default : ' true '
11
11
skip-test :
12
12
description : ' Skip the tests'
13
13
required : false
24
24
25
25
jobs :
26
26
build-test :
27
+ name : Build and Test
27
28
if : contains(toJson(github.event.commits), '[deploy]') == true || (github.event_name == 'workflow_dispatch' && github.event.inputs.skip-test == 'false')
28
29
uses : ./.github/workflows/build-test.yml
29
30
with :
30
- release : ${{ github.event.inputs.release == ' true' }}
31
+ release : ${{ github.event.inputs.release || true }}
31
32
32
33
deploy :
33
34
needs :
34
35
- build-test
35
36
if : (contains(toJson(github.event.commits), '[deploy]') || (github.event_name == 'workflow_dispatch' && github.event.inputs.release == 'true')) && !failure() && !cancelled()
36
- name : Deploy Docker images
37
+ name : Deploy and Release
37
38
runs-on : ubuntu-latest
38
39
permissions : write-all
39
40
steps :
57
58
make set_containerd_image_store
58
59
- name : Output Docker info
59
60
run : docker info
61
+ - name : Set Selenium base version
62
+ uses : ./.github/actions/get-latest-upstream
63
+ with :
64
+ release : ${{ github.event.inputs.release || true }}
65
+ gh_cli_token : ${{ secrets.GITHUB_TOKEN }}
60
66
- name : Sets build date
61
67
run : |
62
68
echo "BUILD_DATE=$(date '+%Y%m%d')" >> $GITHUB_ENV
Original file line number Diff line number Diff line change 6
6
release :
7
7
description : ' Test a new release process'
8
8
required : false
9
- type : boolean
10
- default : false
9
+ type : string
10
+ default : ' false'
11
11
workflow_dispatch :
12
12
inputs :
13
13
request-timeout :
@@ -100,10 +100,10 @@ jobs:
100
100
- name : Output branch name
101
101
run : echo ${BRANCH}
102
102
- name : Set Selenium base version
103
- if : inputs.release != 'true'
104
- run : |
105
- make set_build_nightly
106
- cat .env | xargs -I {} echo {} >> $GITHUB_ENV
103
+ uses : ./.github/actions/get-latest-upstream
104
+ with :
105
+ release : ${{ inputs.release || false }}
106
+ gh_cli_token : ${{ secrets.GITHUB_TOKEN }}
107
107
- name : Sets build date
108
108
run : |
109
109
echo "BUILD_DATE=$(date '+%Y%m%d')" >> $GITHUB_ENV
Original file line number Diff line number Diff line change 13
13
release :
14
14
description : ' Deploy a new release'
15
15
required : false
16
- type : boolean
17
- default : false
16
+ type : string
17
+ default : ' false'
18
18
19
19
jobs :
20
20
helm-chart-test :
Original file line number Diff line number Diff line change 6
6
release :
7
7
description : ' Test a new release process'
8
8
required : false
9
- type : boolean
10
- default : false
9
+ type : string
10
+ default : ' false'
11
11
workflow_dispatch :
12
12
inputs :
13
13
request-timeout :
@@ -108,10 +108,10 @@ jobs:
108
108
- name : Output branch name
109
109
run : echo ${BRANCH}
110
110
- name : Set Selenium base version
111
- if : inputs.release != 'true'
112
- run : |
113
- make set_build_nightly
114
- cat .env | xargs -I {} echo {} >> $GITHUB_ENV
111
+ uses : ./.github/actions/get-latest-upstream
112
+ with :
113
+ release : ${{ inputs.release || false }}
114
+ gh_cli_token : ${{ secrets.GITHUB_TOKEN }}
115
115
- name : Sets build date
116
116
run : |
117
117
echo "BUILD_DATE=$(date '+%Y%m%d')" >> $GITHUB_ENV
Original file line number Diff line number Diff line change 12
12
13
13
jobs :
14
14
build-test :
15
+ name : Build and Test Nightly
15
16
if : github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.skip-test == 'false')
16
17
uses : ./.github/workflows/build-test.yml
17
18
with :
21
22
needs :
22
23
- build-test
23
24
if : (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && !failure() && !cancelled()
24
- name : Nightly build
25
+ name : Deploy and Release Nightly
25
26
runs-on : ubuntu-latest
26
27
permissions : write-all
27
28
steps :
45
46
make set_containerd_image_store
46
47
- name : Output Docker info
47
48
run : docker info
49
+ - name : Set Selenium base version
50
+ uses : ./.github/actions/get-latest-upstream
51
+ with :
52
+ release : false
53
+ gh_cli_token : ${{ secrets.GITHUB_TOKEN }}
48
54
- name : Sets build date
49
55
run : |
50
56
echo "BUILD_DATE=$(date '+%Y%m%d')" >> $GITHUB_ENV
59
65
NAMESPACE : ${{ vars.DOCKER_NAMESPACE || 'selenium' }}
60
66
AUTHORS : ${{ vars.AUTHORS || 'SeleniumHQ' }}
61
67
- name : Build base image to get Grid version
62
- run : VERSION="local" BUILD_DATE=${BUILD_DATE} make base_nightly
68
+ run : VERSION="local" BUILD_DATE=${BUILD_DATE} make base
63
69
- name : Get Grid version
64
70
# sed used to remove last comma of Selenium version output
65
71
run : |
Original file line number Diff line number Diff line change @@ -70,9 +70,6 @@ ci: build test
70
70
base :
71
71
cd ./Base && docker buildx build --platform $(PLATFORMS ) $(BUILD_ARGS ) --build-arg VERSION=$(BASE_VERSION ) --build-arg RELEASE=$(BASE_RELEASE ) --build-arg AUTHORS=$(AUTHORS ) -t $(NAME ) /base:$(TAG_VERSION ) .
72
72
73
- base_nightly :
74
- cd ./Base && docker buildx build --platform $(PLATFORMS ) $(BUILD_ARGS ) --build-arg VERSION=$(BASE_VERSION_NIGHTLY ) --build-arg RELEASE=$(BASE_RELEASE_NIGHTLY ) --build-arg AUTHORS=$(AUTHORS ) -t $(NAME ) /base:$(TAG_VERSION ) .
75
-
76
73
hub : base
77
74
cd ./Hub && docker buildx build --platform $(PLATFORMS ) $(BUILD_ARGS ) $(FROM_IMAGE_ARGS ) -t $(NAME ) /hub:$(TAG_VERSION ) .
78
75
You can’t perform that action at this time.
0 commit comments