Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't use variable substitution in script block #1071

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions task/git-clone-oci-ta/0.1/git-clone-oci-ta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ spec:
value: $(workspaces.basic-auth.bound)
- name: WORKSPACE_BASIC_AUTH_DIRECTORY_PATH
value: $(workspaces.basic-auth.path)
- name: COMMIT_PATH_RESULT
value: $(results.commit.path)
- name: URL_PATH
value: $(results.url.path)
- name: CHECKOUT_DIR
value: /var/workdir/source
script: |
Expand Down Expand Up @@ -234,8 +238,8 @@ spec:
if [ "${EXIT_CODE}" != 0 ]; then
exit "${EXIT_CODE}"
fi
printf "%s" "${RESULT_SHA}" >"$( results.commit.path)"
printf "%s" "${PARAM_URL}" >"$( results.url.path)"
printf "%s" "${RESULT_SHA}" >"${COMMIT_PATH_RESULT}"
printf "%s" "${PARAM_URL}" >"${URL_PATH}"

if [ "${PARAM_FETCH_TAGS}" = "true" ]; then
echo "Fetching tags"
Expand Down
8 changes: 6 additions & 2 deletions task/git-clone/0.1/git-clone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ spec:
value: $(workspaces.basic-auth.bound)
- name: WORKSPACE_BASIC_AUTH_DIRECTORY_PATH
value: $(workspaces.basic-auth.path)
- name: COMMIT_PATH_RESULT
value: $(results.commit.path)
- name: URL_PATH
value: $(results.url.path)
image: quay.io/konflux-ci/git-clone@sha256:005487d3967e7a90490f96b2ff3b0c6d0463b647d212cd809683b494e20146a8
computeResources: {}
securityContext:
Expand Down Expand Up @@ -233,8 +237,8 @@ spec:
if [ "${EXIT_CODE}" != 0 ] ; then
exit "${EXIT_CODE}"
fi
printf "%s" "${RESULT_SHA}" > "$(results.commit.path)"
printf "%s" "${PARAM_URL}" > "$(results.url.path)"
printf "%s" "${RESULT_SHA}" > "${COMMIT_PATH_RESULT}"
printf "%s" "${PARAM_URL}" > "${URL_PATH}"

if [ "${PARAM_FETCH_TAGS}" = "true" ] ; then
echo "Fetching tags"
Expand Down