Skip to content

Commit 7466d00

Browse files
Allow setting a timeout (#157)
1 parent 83a0aec commit 7466d00

File tree

9 files changed

+59
-2
lines changed

9 files changed

+59
-2
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@ Install Chrome, Chrome for Testing, ChromeDriver, Edge, Firefox and geckodriver
66

77
For full usage guidelines, see the [orb registry listing](http://circleci.com/orbs/registry/orb/circleci/browser-tools).
88

9+
### Timeout parameter
10+
11+
All install commands support a `timeout` parameter that maps to CircleCI's `no_output_timeout`. Example:
12+
13+
```yaml
14+
- browser-tools/install_chrome:
15+
replace_existing: true
16+
timeout: 5m
17+
- browser-tools/install_chromedriver:
18+
timeout: 5m
19+
```
20+
921
## Contributing
1022
1123
We welcome [issues](https://github.com/CircleCI-Public/browser-tools-orb/issues) to and [pull requests](https://github.com/CircleCI-Public/browser-tools-orb/pulls) against this repository!

src/commands/install_chrome.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ parameters:
3939
Defaults to v1.
4040
default: v1
4141
type: string
42+
timeout:
43+
type: string
44+
default: 10m
45+
description: >
46+
Maximum time to allow without output before failing the step. Passed to CircleCI's no_output_timeout.
4247
steps:
4348
- when:
4449
condition: <<parameters.use_cache>>
@@ -51,6 +56,7 @@ steps:
5156
command: <<include(scripts/process_cache.sh)>>
5257
environment:
5358
ORB_PARAM_CHANNEL: << parameters.channel >>
59+
no_output_timeout: <<parameters.timeout>>
5460
- run:
5561
name: Install Google Chrome
5662
environment:
@@ -59,6 +65,7 @@ steps:
5965
ORB_PARAM_CHANNEL: << parameters.channel >>
6066
ORB_PARAM_SAVE_CACHE: <<parameters.use_cache>>
6167
command: <<include(scripts/install_chrome.sh)>>
68+
no_output_timeout: <<parameters.timeout>>
6269
- when:
6370
condition: <<parameters.use_cache>>
6471
steps:

src/commands/install_chrome_for_testing.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ parameters:
2121
default: true
2222
description: >
2323
Whether or not to install Chrome for Testing ChromeDriver alongside Chrome for Testing
24+
timeout:
25+
type: string
26+
default: 10m
27+
description: >
28+
Maximum time to allow without output before failing the step. Passed to CircleCI's no_output_timeout.
2429
steps:
2530
- run:
2631
name: Install Chrome for Testing
@@ -29,3 +34,4 @@ steps:
2934
ORB_PARAM_VERSION: <<parameters.version>>
3035
ORB_PARAM_INSTALL_CHROMEDRIVER: <<parameters.install_chromedriver>>
3136
command: <<include(scripts/install_chrome_for_testing.sh)>>
37+
no_output_timeout: <<parameters.timeout>>

src/commands/install_chromedriver.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,16 @@ parameters:
1212
description: >
1313
Directory in which to install ChromeDriver (directory selection
1414
not supported on Alpine Linux)
15+
timeout:
16+
type: string
17+
default: 10m
18+
description: >
19+
Maximum time to allow without output before failing the step. Passed to CircleCI's no_output_timeout.
1520
1621
steps:
1722
- run:
1823
name: Install ChromeDriver
1924
environment:
2025
ORB_PARAM_DRIVER_INSTALL_DIR: <<parameters.install_dir>>
2126
command: <<include(scripts/install_chromedriver.sh)>>
27+
no_output_timeout: <<parameters.timeout>>

src/commands/install_edge.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,15 @@ parameters:
1111
description: >
1212
Version of Edge to install, defaults to the latest stable release.
1313
This param only works for Ubuntu/Debian version, macOS will always install latest version.
14+
timeout:
15+
type: string
16+
default: 10m
17+
description: >
18+
Maximum time to allow without output before failing the step. Passed to CircleCI's no_output_timeout.
1419
steps:
1520
- run:
1621
name: Install Edge
1722
environment:
1823
ORB_PARAM_VERSION: <<parameters.version>>
1924
command: <<include(scripts/install_edge.sh)>>
25+
no_output_timeout: <<parameters.timeout>>

src/commands/install_edge_driver.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,16 @@ parameters:
88
default: /usr/local/bin
99
description: >
1010
Directory in which to install Edge WebDriver
11+
timeout:
12+
type: string
13+
default: 10m
14+
description: >
15+
Maximum time to allow without output before failing the step. Passed to CircleCI's no_output_timeout.
1116
1217
steps:
1318
- run:
1419
name: Install Edge WebDriver
1520
environment:
1621
ORB_PARAM_DRIVER_INSTALL_DIR: <<parameters.install_dir>>
1722
command: <<include(scripts/install_edge_driver.sh)>>
23+
no_output_timeout: <<parameters.timeout>>

src/commands/install_firefox.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ parameters:
3131
Defaults to v1.
3232
default: v1
3333
type: string
34+
timeout:
35+
type: string
36+
default: 10m
37+
description: >
38+
Maximum time to allow without output before failing the step. Passed to CircleCI's no_output_timeout.
3439
steps:
3540
- when:
3641
condition:
@@ -49,6 +54,7 @@ steps:
4954
ORB_PARAM_FIREFOX_VERSION: <<parameters.version>>
5055
ORB_PARAM_SAVE_CACHE: <<parameters.use_cache>>
5156
command: <<include(scripts/install_firefox.sh)>>
57+
no_output_timeout: <<parameters.timeout>>
5258
- when:
5359
condition:
5460
and:

src/commands/install_geckodriver.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ parameters:
1919
default: /usr/local/bin
2020
description: >
2121
Directory in which to install geckodriver
22+
timeout:
23+
type: string
24+
default: 10m
25+
description: >
26+
Maximum time to allow without output before failing the step. Passed to CircleCI's no_output_timeout.
2227
2328
steps:
2429
- run:
@@ -27,3 +32,4 @@ steps:
2732
ORB_PARAM_GECKO_INSTALL_DIR: <<parameters.install_dir>>
2833
ORB_PARAM_GECKO_VERSION: <<parameters.version>>
2934
command: <<include(scripts/install_geckodriver.sh)>>
35+
no_output_timeout: <<parameters.timeout>>

src/examples/install_chrome.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ usage:
99
docker:
1010
- image: cimg/node:20.4.0-browsers
1111
steps:
12-
- browser-tools/install_chrome
13-
- browser-tools/install_chromedriver
12+
- browser-tools/install_chrome:
13+
timeout: 5m
14+
- browser-tools/install_chromedriver:
15+
timeout: 5m
1416
- run:
1517
name: Check install
1618
command: |

0 commit comments

Comments
 (0)