Skip to content

Commit 21d6b6f

Browse files
committed
feat: exitfirst param to pytest cmd via label
1 parent 7ff8324 commit 21d6b6f

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

.github/workflows/reusable-build-test-release.yml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ on:
3939
required: false
4040
description: "branch for k8s manifests to run the tests on"
4141
type: string
42-
default: "v3.4"
42+
default: "v3.3.2"
4343
scripted-inputs-os-list:
4444
required: false
4545
description: "list of OS used for scripted input tests"
@@ -129,6 +129,7 @@ jobs:
129129
execute-scripted_inputs-labeled: ${{ steps.configure-tests-on-labels.outputs.execute_scripted_inputs_labeled }}
130130
execute-requirement-labeled: ${{ steps.configure-tests-on-labels.outputs.execute_requirement_test_labeled }}
131131
execute-upgrade-labeled: ${{ steps.configure-tests-on-labels.outputs.execute_upgrade_test_labeled }}
132+
exit-first: ${{ steps.configure-tests-on-labels.outputs.exit-first }}
132133
s3_bucket_k8s: ${{ steps.k8s-environment.outputs.s3_bucket }}
133134
argo_server_domain_k8s: ${{ steps.k8s-environment.outputs.argo_server_domain }}
134135
argo_token_secret_id_k8s: ${{ steps.k8s-environment.outputs.argo_token_secret_id }}
@@ -225,6 +226,13 @@ jobs:
225226
echo "$test_type""_labeled=${EXECUTE_LABELED["$test_type"]}" >> "$GITHUB_OUTPUT"
226227
echo "$test_type""_labeled: ${EXECUTE_LABELED["$test_type"]}"
227228
done
229+
# exit first fail if label exit-first is present
230+
EXIT_FIRST=""
231+
if ${{ contains(github.event.pull_request.labels.*.name, 'exit-first') }}; then
232+
EXIT_FIRST="-x"
233+
fi
234+
echo "exit-first=${EXIT_FIRST}" >> "$GITHUB_OUTPUT"
235+
echo "exit-first: ${EXIT_FIRST}"
228236
229237
validate-pr-title:
230238
name: Validate PR title
@@ -1107,7 +1115,7 @@ jobs:
11071115
with:
11081116
splunk: ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }}
11091117
test-type: ${{ env.TEST_TYPE }}
1110-
test-args: ""
1118+
test-args: ${{ needs.setup-workflow.outputs.exit-first }}
11111119
job-name: ${{ steps.create-job-name.outputs.job-name }}
11121120
labels: ${{ needs.setup.outputs.labels }}
11131121
workflow-tmpl-name: ${{ needs.setup.outputs.argo-workflow-tmpl-name }}
@@ -1376,7 +1384,7 @@ jobs:
13761384
with:
13771385
splunk: ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }}
13781386
test-type: ${{ env.TEST_TYPE }}
1379-
test-args: ""
1387+
test-args: ${{ needs.setup-workflow.outputs.exit-first }}
13801388
job-name: ${{ steps.create-job-name.outputs.job-name }}
13811389
labels: ${{ needs.setup.outputs.labels }}
13821390
workflow-tmpl-name: ${{ needs.setup.outputs.argo-workflow-tmpl-name }}
@@ -1645,7 +1653,7 @@ jobs:
16451653
with:
16461654
splunk: ${{ matrix.splunk.version }}
16471655
test-type: ${{ env.TEST_TYPE }}
1648-
test-args: ""
1656+
test-args: ${{ needs.setup-workflow.outputs.exit-first }}
16491657
job-name: ${{ steps.create-job-name.outputs.job-name }}
16501658
labels: ${{ needs.setup.outputs.labels }}
16511659
workflow-tmpl-name: ${{ needs.setup.outputs.argo-workflow-tmpl-name }}
@@ -1849,7 +1857,7 @@ jobs:
18491857
ARGO_NAMESPACE: ${{ needs.setup.outputs.argo-namespace }}
18501858
SPLUNK_VERSION_BASE: ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }}
18511859
TEST_TYPE: "ui"
1852-
TEST_ARGS: "--browser ${{ matrix.browser }}"
1860+
TEST_ARGS: "--browser ${{ matrix.browser }} ${{ needs.setup-workflow.outputs.exit-first }}"
18531861
TEST_BROWSER: ${{ matrix.browser }}
18541862
permissions:
18551863
actions: read
@@ -1916,7 +1924,7 @@ jobs:
19161924
with:
19171925
splunk: ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }}
19181926
test-type: ${{ env.TEST_TYPE }}
1919-
test-args: ${{ env.TEST_ARGS }} ${{ steps.create-test-arg.outputs.test-arg }} ${{ matrix.marker }}
1927+
test-args: ${{ env.TEST_ARGS }} ${{ steps.create-test-arg.outputs.test-arg }} ${{ matrix.marker }} ${{ needs.setup-workflow.outputs.exit-first }}
19201928
job-name: ${{ steps.create-job-name.outputs.job-name }}
19211929
labels: ${{ needs.setup.outputs.labels }}
19221930
workflow-tmpl-name: ${{ needs.setup.outputs.argo-workflow-tmpl-name }}
@@ -2193,7 +2201,7 @@ jobs:
21932201
with:
21942202
splunk: ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }}
21952203
test-type: ${{ env.TEST_TYPE }}
2196-
test-args: ${{ env.TEST_ARGS }} ${{ steps.create-test-arg.outputs.test-arg }} ${{ matrix.marker }}
2204+
test-args: ${{ env.TEST_ARGS }} ${{ steps.create-test-arg.outputs.test-arg }} ${{ matrix.marker }} ${{ needs.setup-workflow.outputs.exit-first }}
21972205
job-name: ${{ steps.create-job-name.outputs.job-name }}
21982206
labels: ${{ needs.setup.outputs.labels }}
21992207
workflow-tmpl-name: ${{ needs.setup.outputs.argo-workflow-tmpl-name }}
@@ -2468,7 +2476,7 @@ jobs:
24682476
with:
24692477
splunk: ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }}
24702478
test-type: ${{ env.TEST_TYPE }}
2471-
test-args: ${{ env.TEST_ARGS }} ${{ steps.create-test-arg.outputs.test-arg }} ${{ matrix.marker }}
2479+
test-args: ${{ env.TEST_ARGS }} ${{ steps.create-test-arg.outputs.test-arg }} ${{ matrix.marker }} ${{ needs.setup-workflow.outputs.exit-first }}
24722480
job-name: ${{ steps.create-job-name.outputs.job-name }}
24732481
labels: ${{ needs.setup.outputs.labels }}
24742482
workflow-tmpl-name: ${{ needs.setup.outputs.argo-workflow-tmpl-name }}
@@ -3005,7 +3013,7 @@ jobs:
30053013
with:
30063014
splunk: ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }}
30073015
test-type: ${{ env.TEST_TYPE }}
3008-
test-args: "--hostname=spl --os-name=${{ steps.os-name-version.outputs.os-name }} --os-version=${{ steps.os-name-version.outputs.os-version }} -m script_input"
3016+
test-args: "--hostname=spl --os-name=${{ steps.os-name-version.outputs.os-name }} --os-version=${{ steps.os-name-version.outputs.os-version }} -m script_input ${{ needs.setup-workflow.outputs.exit-first }}"
30093017
job-name: ${{ steps.create-job-name.outputs.job-name }}
30103018
labels: ${{ needs.setup.outputs.labels }}
30113019
workflow-tmpl-name: ${{ needs.setup.outputs.argo-workflow-tmpl-name }}

0 commit comments

Comments
 (0)