Skip to content

Commit

Permalink
Merge pull request #1 from splunk/test/try-lukasz
Browse files Browse the repository at this point in the history
Test/try lukasz
  • Loading branch information
siddharth-khatsuriya authored Aug 31, 2021
2 parents 41eadad + 090082b commit 6b2f276
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
6 changes: 5 additions & 1 deletion action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ inputs:
description: 'Name of workflow template to trigger'
required: true
workflow-template-ns:
description: 'Namespace where the orkflow template lies'
description: 'Namespace where the workflow template lies'
required: false
default: 'default'
destroy-setup:
Expand All @@ -46,6 +46,9 @@ inputs:
addon-url:
description: 'URL for Add-on spl'
required: true
addon-secret-id:
description: 'AWS addon secret ID'
required: true

outputs:
workflow-name: # id of output
Expand All @@ -63,4 +66,5 @@ runs:
- ${{ inputs.test-type }}
- ${{ inputs.test-args }}
- ${{ inputs.labels }}
- ${{ inputs.addon-secret-id }}

14 changes: 9 additions & 5 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,16 @@
# ########################################################################
env | grep ARGO

RANDOM_STRING=`head -3 /dev/urandom | tr -cd '[:lower:]' | cut -c -4`
JOB_NAME="${5}-$RANDOM_STRING"

WORKFLOW_NAME=`argo submit -v -o json --from wftmpl/${1} -n ${2} -l workflows.argoproj.io/workflow-template=${1} --argo-base-href '' \
-p ci-repository-url="[email protected]:${GITHUB_REPOSITORY}.git" -p ci-commit-sha=${GITHUB_SHA} -p run-destroy=${3} \
-p addon-url="${4}" -p job-name=${JOB_NAME} -p splunk-version=${6} -p test-type=${7} -p test-args="${8}" -l="${9}" | jq -r .metadata.name`
-p ci-repository-url="[email protected]:${GITHUB_REPOSITORY}.git" \
-p ci-commit-sha=${GITHUB_SHA} -p run-destroy=${3} \
-p addon-url="${4}" \
-p job-name=${5} \
-p splunk-version=${6} \
-p test-type=${7} \
-p pytest-args="${8}" \
-p aws-addon-secret-id=${10} \
-l="${9},test-type=${7},splunk-version=${6}" | jq -r .metadata.name`

echo "After argo submit $?"
echo 'WORKFLOW_NAME:' ${WORKFLOW_NAME}
Expand Down

0 comments on commit 6b2f276

Please sign in to comment.