diff --git a/Dockerfile b/Dockerfile index 0cfd0c4..a080eb3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,4 +25,4 @@ RUN curl -o kustomize.tar.gz -L https://github.com/kubernetes-sigs/kustomize/rel COPY entrypoint.sh /entrypoint.sh # Code file to execute when the docker container starts up (`entrypoint.sh`) -ENTRYPOINT ["bash","/entrypoint.sh"] \ No newline at end of file +ENTRYPOINT ["bash","-x","/entrypoint.sh"] \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh index 7501865..cc2db35 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -15,13 +15,13 @@ # See the License for the specific language governing permissions and # limitations under the License. # ######################################################################## + RANDOM_STRING=`head -3 /dev/urandom | tr -cd '[:lower:]' | cut -c -4` -echo 'RANDOM_STRING: ${RANDOM_STRING}' JOB_NAME="$5-$RANDOM_STRING" WORKFLOW_NAME=`argo submit -o json --from wftmpl/$1 -n $2 -l workflows.argoproj.io/workflow-template=$1 \ -p ci-repository-url="git@github.com:${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" $9 | jq -r .metadata.name` + -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` echo "After argo submit $?" echo 'WORKFLOW_NAME:' ${WORKFLOW_NAME} echo "::set-output name=workflow-name::$(echo $WORKFLOW_NAME)"