From 43981076f98514f0a08875c41adb006f314c6ee0 Mon Sep 17 00:00:00 2001 From: Sam Doran Date: Fri, 20 Sep 2024 12:52:42 -0400 Subject: [PATCH] Documentation changes --- task/git-clone-oci-ta/0.1/README.md | 4 ++-- task/git-clone-oci-ta/0.1/git-clone-oci-ta.yaml | 15 ++++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/task/git-clone-oci-ta/0.1/README.md b/task/git-clone-oci-ta/0.1/README.md index c61a4f2da1..165c812aa3 100644 --- a/task/git-clone-oci-ta/0.1/README.md +++ b/task/git-clone-oci-ta/0.1/README.md @@ -17,21 +17,21 @@ The git-clone-oci-ta Task will clone a repo from the provided url and store it a |ociStorage|The OCI repository where the Trusted Artifacts are stored.||true| |refspec|Refspec to fetch before checking out revision.|""|false| |revision|Revision to checkout. (branch, tag, sha, ref, etc...)|""|false| +|shortCommitLength|Length of short commit SHA|7|false| |sparseCheckoutDirectories|Define the directory patterns to match or exclude when performing a sparse checkout.|""|false| |sslVerify|Set the `http.sslVerify` global git config. Setting this to `false` is not advised unless you are sure that you trust your git remote.|true|false| |submodules|Initialize and fetch git submodules.|true|false| |url|Repository URL to clone from.||true| |userHome|Absolute path to the user's home directory. Set this explicitly if you are running the image as a non-root user. |/tekton/home|false| |verbose|Log the commands that are executed during `git-clone`'s operation.|false|false| -|shortCommitLength|Length of the returned short-commit|7|false| ## Results |name|description| |---|---| |SOURCE_ARTIFACT|The Trusted Artifact URI pointing to the artifact with the application source code.| |commit|The precise commit SHA that was fetched by this Task.| -|short-commit|The commit SHA that was fetched by this Task shortened to `shortCommitLength` number of characters| |commit-timestamp|The commit timestamp of the checkout| +|short-commit|The commit SHA that was fetched by this Task limited to params.shortCommitLength number of characters| |url|The precise URL that was fetched by this Task.| ## Workspaces diff --git a/task/git-clone-oci-ta/0.1/git-clone-oci-ta.yaml b/task/git-clone-oci-ta/0.1/git-clone-oci-ta.yaml index 50e2c8daf1..3bd111696d 100644 --- a/task/git-clone-oci-ta/0.1/git-clone-oci-ta.yaml +++ b/task/git-clone-oci-ta/0.1/git-clone-oci-ta.yaml @@ -29,10 +29,6 @@ spec: N commits. type: string default: "1" - - name: shortCommitLength - description: Length of short commit SHA - type: string - default: "7" - name: enableSymlinkCheck description: | Check symlinks in the repo. If they're pointing outside of the repo, the build will fail. @@ -70,6 +66,10 @@ spec: description: Revision to checkout. (branch, tag, sha, ref, etc...) type: string default: "" + - name: shortCommitLength + description: Length of short commit SHA + type: string + default: "7" - name: sparseCheckoutDirectories description: Define the directory patterns to match or exclude when performing a sparse checkout. @@ -105,10 +105,11 @@ spec: type: string - name: commit description: The precise commit SHA that was fetched by this Task. - - name: short-commit - description: The commit SHA that was fetched by this Task limited to params.shortCommitLength number of characters - name: commit-timestamp description: The commit timestamp of the checkout + - name: short-commit + description: The commit SHA that was fetched by this Task limited to + params.shortCommitLength number of characters - name: url description: The precise URL that was fetched by this Task. volumes: @@ -246,7 +247,7 @@ spec: exit "${EXIT_CODE}" fi printf "%s" "${RESULT_SHA}" >"$(results.commit.path)" - printf "%s" "${RESULT_SHA_SHORT}" > "$(results.short-commit.path)" + printf "%s" "${RESULT_SHA_SHORT}" >"$(results.short-commit.path)" printf "%s" "${PARAM_URL}" >"$(results.url.path)" printf "%s" "$(git log -1 --pretty=%ct)" >"$(results.commit-timestamp.path)"