diff --git a/share/gitea-tekton-org/auto_Task.tf b/share/gitea-tekton-org/auto_Task.tf index 58ffa17..fd763a0 100644 --- a/share/gitea-tekton-org/auto_Task.tf +++ b/share/gitea-tekton-org/auto_Task.tf @@ -138,6 +138,8 @@ resource "kubectl_manifest" "Task_auto-cd-create" { image: $(params.toolbox-image) workingDir: $(workspaces.source.path) args: + - $(params.known-repos) + - -- - $(params.stages) env: - name: ARTIFACTORY_URL @@ -168,10 +170,18 @@ resource "kubectl_manifest" "Task_auto-cd-create" { cleanup git_prepare "$(params.deploy-url)" "Auto CD" "autocd@$(params.domain-name)" install_base + REPOS="" + while [ $# -ge 1 ] && [[ $1 != "--" ]];do + REPOS="$REPOS$1 " + shift + done + if [ $# -gt 1 ];then + shift + fi create_prj "$@" - STAGES="$@" + STAGES="$*" echo "$(params.known-repos[*])" - for PROJECT_NAME in $(params.known-repos[*]);do + for PROJECT_NAME in $REPOS;do create_prj $STAGES done git_push "Adding $(params.project-name)"