Skip to content

Commit bce5222

Browse files
authored
Merge pull request #56 from splunk/test/add_marker
Add marker input
2 parents dc91df3 + bfeb9be commit bce5222

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

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

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
name: build-test-release
33
on:
44
workflow_call:
5+
inputs:
6+
marker:
7+
required: false
8+
description: 'Parallel run marker'
9+
type: string
10+
default: >-
11+
[""]
512
secrets:
613
GH_TOKEN_ADMIN:
714
description: Github admin token
@@ -1084,6 +1091,7 @@ jobs:
10841091
splunk: ${{ fromJson(needs.meta.outputs.matrix_supportedSplunk) }}
10851092
modinput-type: ["modinput_functional"]
10861093
vendor-version: ${{ fromJson(needs.meta.outputs.matrix_supportedModinputFunctionalVendors) }}
1094+
marker: ${{ fromJson(inputs.marker) }}
10871095
container:
10881096
image: ghcr.io/splunk/workflow-engine-base:2.0.3
10891097
env:
@@ -1120,6 +1128,18 @@ jobs:
11201128
JOB_NAME=${JOB_NAME//[_.]/-}
11211129
JOB_NAME=$(echo "$JOB_NAME" | tr '[:upper:]' '[:lower:]')
11221130
echo "::set-output name=job-name::$JOB_NAME"
1131+
- name: create test argument
1132+
id: create-test-arg
1133+
shell: bash
1134+
run: |
1135+
export comparing_variable="[]"
1136+
if [ "${{ inputs.marker }}" == "$comparing_variable" ]
1137+
then
1138+
TEST_ARG_M=""
1139+
else
1140+
TEST_ARG_M="-m"
1141+
fi
1142+
echo "::set-output name=test-arg::$TEST_ARG_M"
11231143
- name: run-tests
11241144
id: run-tests
11251145
env:
@@ -1128,7 +1148,7 @@ jobs:
11281148
with:
11291149
splunk: ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }}
11301150
test-type: ${{ env.TEST_TYPE }}
1131-
test-args: ${{ env.TEST_ARGS }}
1151+
test-args: ${{ env.TEST_ARGS }} ${{ steps.create-test-arg.outputs.test-arg }} ${{ matrix.marker }}
11321152
job-name: ${{ steps.create-job-name.outputs.job-name }}
11331153
labels: ${{ needs.setup.outputs.labels }}
11341154
workflow-tmpl-name: ${{ needs.setup.outputs.argo-workflow-tmpl-name }}

0 commit comments

Comments
 (0)