From be1b81753763dc4cc85d7343273b9fa804d13348 Mon Sep 17 00:00:00 2001 From: Aneesh-M-Bhat Date: Tue, 17 Sep 2024 18:11:23 +0530 Subject: [PATCH] Fixed usage of SUBDIRECTORY --- scripts/maven-generate.sh | 2 +- templates/load-scripts.tpl | 1 - test/e2e/resources/pipeline-maven.yaml | 5 ++++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/maven-generate.sh b/scripts/maven-generate.sh index 7a14b54..ee05797 100644 --- a/scripts/maven-generate.sh +++ b/scripts/maven-generate.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -declare -rx MAVEN_GENERATE_DIRECTORY="${WORKSPACES_SOURCE_PATH}/maven-generate" +declare -rx MAVEN_GENERATE_DIRECTORY="${WORKSPACES_SOURCE_PATH}/${PARAMS_SUBDIRECTORY}/maven-generate" declare -rx MAVEN_SETTINGS_FILE="${MAVEN_GENERATE_DIRECTORY}/settings.xml" diff --git a/templates/load-scripts.tpl b/templates/load-scripts.tpl index c7387bc..3c52207 100644 --- a/templates/load-scripts.tpl +++ b/templates/load-scripts.tpl @@ -14,7 +14,6 @@ set -e printf '%s' "{{ $content | toString | b64enc }}" |base64 -d >"/scripts/{{ $name }}" {{- end }} {{- end }} -ls /scripts/{{ $prefix }}*.sh; chmod +x /scripts/{{ $prefix }}*.sh; {{- end }} diff --git a/test/e2e/resources/pipeline-maven.yaml b/test/e2e/resources/pipeline-maven.yaml index 80432ed..d0e8a26 100644 --- a/test/e2e/resources/pipeline-maven.yaml +++ b/test/e2e/resources/pipeline-maven.yaml @@ -16,7 +16,6 @@ spec: - name: proxy_configmap optional: true - params: - name: URL type: string @@ -48,6 +47,8 @@ spec: value: "false" - name: VERBOSE value: "$(params.VERBOSE)" + - name: SUBDIRECTORY + value: $(context.pipelineRun.name) - name: maven taskRef: name: maven @@ -57,6 +58,8 @@ spec: - name: GOALS value: - "validate" + - name: SUBDIRECTORY + value: $(context.pipelineRun.name) runAfter: - git-clone workspaces: