From 0ae3c0a49933ca1fe637bdb4f6a38e0b3f9fb4da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Huss?= Date: Tue, 18 Jun 2024 18:06:01 +0200 Subject: [PATCH] fix --- share/gitea-tekton-org/auto_Task.tf | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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)"