Skip to content

Commit f46923a

Browse files
authored
Merge pull request #11 from Testlio/feature/add-results-polling/GREEN-722
GREEN-722: Add support for results polling
2 parents 5d47561 + ec90330 commit f46923a

File tree

5 files changed

+15
-2
lines changed

5 files changed

+15
-2
lines changed

src/commands/create-run.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,17 @@ parameters:
2828
default: false
2929
description: |
3030
When true it runs configuration validations without creating run.
31+
poll-results:
32+
type: boolean
33+
default: false
34+
description: |
35+
When true, it will keep polling for until a definitive result is returned
3136
steps:
3237
- run:
3338
name: Scheduling automated run
3439
environment:
3540
DRY_RUN: << parameters.dry-run >>
41+
POLL_RESULTS: << parameters.poll-results >>
3642
RUN_API_TOKEN_ENV_NAME: << parameters.token >>
3743
TEST_CONFIG_PATH: << parameters.test-config >>
3844
PROJECT_CONFIG_PATH: << parameters.project-config >>

src/examples/schedule-run-fetching-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: >
55
usage:
66
version: 2.1
77
orbs:
8-
testlio: testlio/testlio@1.0.1
8+
testlio: testlio/testlio@1.0.5
99
workflows:
1010
schedule-run-for-a-project:
1111
jobs:

src/examples/schedule-run.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: |
44
usage:
55
version: 2.1
66
orbs:
7-
testlio: testlio/testlio@1.0.1
7+
testlio: testlio/testlio@1.0.5
88
workflows:
99
schedule-run:
1010
jobs:

src/jobs/schedule-run.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ parameters:
3737
default: false
3838
description: |
3939
When true it runs configuration validations without creating run.
40+
poll-results:
41+
type: boolean
42+
default: false
43+
description: |
44+
When true, it will keep polling for until a definitive result is returned
4045
steps:
4146
- when:
4247
condition: << parameters.attach-workspace >>
@@ -50,6 +55,7 @@ steps:
5055
- install
5156
- create-run:
5257
dry-run: << parameters.dry-run >>
58+
poll-results: << parameters.poll-results >>
5359
token: << parameters.token >>
5460
test-config: << parameters.test-config >>
5561
project-config: << parameters.project-config >>

src/scripts/create-run.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export RUN_API_TOKEN=${!RUN_API_TOKEN_ENV_NAME}
1212

1313
OPTIONAL_ARGS=()
1414
[ "$DRY_RUN" -eq 1 ] && OPTIONAL_ARGS+=("--dryRun")
15+
[ "$POLL_RESULTS" -eq 1 ] && OPTIONAL_ARGS+=("--pollResults")
1516
[ -n "$TEST_ARGS" ] && OPTIONAL_ARGS+=("--testArgs=${TEST_ARGS}")
1617

1718
testlio create-run --projectConfig "${PROJECT_CONFIG_PATH}" --testConfig "${TEST_CONFIG_PATH}" "${OPTIONAL_ARGS[@]+"${OPTIONAL_ARGS[@]}"}"

0 commit comments

Comments
 (0)