Skip to content

Commit

Permalink
Merge pull request #56 from splunk/test/add_marker
Browse files Browse the repository at this point in the history
Add marker input
  • Loading branch information
rajeshad authored May 18, 2022
2 parents dc91df3 + bfeb9be commit bce5222
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion .github/workflows/reusable-build-test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
name: build-test-release
on:
workflow_call:
inputs:
marker:
required: false
description: 'Parallel run marker'
type: string
default: >-
[""]
secrets:
GH_TOKEN_ADMIN:
description: Github admin token
Expand Down Expand Up @@ -1084,6 +1091,7 @@ jobs:
splunk: ${{ fromJson(needs.meta.outputs.matrix_supportedSplunk) }}
modinput-type: ["modinput_functional"]
vendor-version: ${{ fromJson(needs.meta.outputs.matrix_supportedModinputFunctionalVendors) }}
marker: ${{ fromJson(inputs.marker) }}
container:
image: ghcr.io/splunk/workflow-engine-base:2.0.3
env:
Expand Down Expand Up @@ -1120,6 +1128,18 @@ jobs:
JOB_NAME=${JOB_NAME//[_.]/-}
JOB_NAME=$(echo "$JOB_NAME" | tr '[:upper:]' '[:lower:]')
echo "::set-output name=job-name::$JOB_NAME"
- name: create test argument
id: create-test-arg
shell: bash
run: |
export comparing_variable="[]"
if [ "${{ inputs.marker }}" == "$comparing_variable" ]
then
TEST_ARG_M=""
else
TEST_ARG_M="-m"
fi
echo "::set-output name=test-arg::$TEST_ARG_M"
- name: run-tests
id: run-tests
env:
Expand All @@ -1128,7 +1148,7 @@ jobs:
with:
splunk: ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }}
test-type: ${{ env.TEST_TYPE }}
test-args: ${{ env.TEST_ARGS }}
test-args: ${{ env.TEST_ARGS }} ${{ steps.create-test-arg.outputs.test-arg }} ${{ matrix.marker }}
job-name: ${{ steps.create-job-name.outputs.job-name }}
labels: ${{ needs.setup.outputs.labels }}
workflow-tmpl-name: ${{ needs.setup.outputs.argo-workflow-tmpl-name }}
Expand Down

0 comments on commit bce5222

Please sign in to comment.