diff --git a/task/git-clone/0.1/README.md b/task/git-clone/0.1/README.md index 87b209f529..50fa098325 100644 --- a/task/git-clone/0.1/README.md +++ b/task/git-clone/0.1/README.md @@ -53,4 +53,3 @@ The following pipelines demonstrate usage of the git-clone Task: - [Cloning a branch](../0.1/samples/git-clone-checking-out-a-branch.yaml) - [Checking out a specific git commit](../0.1/samples/git-clone-checking-out-a-commit.yaml) - [Checking out a git tag and using the "commit" Task Result](../0.1/samples/using-git-clone-result.yaml) - diff --git a/task/git-clone/0.1/git-clone.yaml b/task/git-clone/0.1/git-clone.yaml index 39b1176c05..1a44270be6 100644 --- a/task/git-clone/0.1/git-clone.yaml +++ b/task/git-clone/0.1/git-clone.yaml @@ -116,4 +116,4 @@ spec: exit $EXIT_CODE fi # Make sure we don't add a trailing newline to the result! - echo -n "$RESULT_SHA" > $(results.commit.path) + echo -n "$RESULT_SHA" > $(results.commit.path) \ No newline at end of file diff --git a/task/git-clone/0.2/README.md b/task/git-clone/0.2/README.md index 20128111bc..d7a480964e 100644 --- a/task/git-clone/0.2/README.md +++ b/task/git-clone/0.2/README.md @@ -1,10 +1,6 @@ -# Git Task +# `git-clone` -This `Task` is Git task to work with repositories used by other tasks -in your Pipeline. -## `git-clone` - -**Please Note: this Task is only compatible with Tekton Pipelines versions 0.11-rc1 and greater!** +**Please Note: this Task is only compatible with Tekton Pipelines versions 0.14.0 and greater!** This `Task` has two required inputs: @@ -32,8 +28,8 @@ as well as ### Parameters * **url**: git url to clone (_required_) -* **revision**: git revision to checkout (branch, tag, sha, ref…) (_default_: master) -* **refspec**: git refspec to fetch before checking out revision (_default_:refs/heads/master:refs/heads/master) +* **revision**: git revision to checkout (branch, tag, sha, ref…) (_default_: "") +* **refspec**: git refspec to fetch before checking out revision (_default_:"") * **submodules**: defines if the resource should initialize and fetch the submodules (_default_: true) * **depth**: performs a shallow clone where only the most recent commit(s) will be fetched (_default_: 1) * **sslVerify**: defines if http.sslVerify should be set to true or false in the global git config (_default_: true) @@ -50,11 +46,12 @@ as well as ## Usage -### `git-clone` +If the `revision` is not provided in the param of the taskrun +then it will auto-detect the branch as specified by the `default` +in the respective git repository. The following pipelines demonstrate usage of the git-clone Task: -- [Cloning a branch](../0.1/samples/git-clone-checking-out-a-branch.yaml) -- [Checking out a specific git commit](../0.1/samples/git-clone-checking-out-a-commit.yaml) -- [Checking out a git tag and using the "commit" Task Result](../0.1/samples/using-git-clone-result.yaml) - +- [Cloning a branch](../0.2/samples/git-clone-checking-out-a-branch.yaml) +- [Checking out a specific git commit](../0.2/samples/git-clone-checking-out-a-commit.yaml) +- [Checking out a git tag and using the "commit" Task Result](../0.2/samples/using-git-clone-result.yaml) diff --git a/task/git-clone/0.2/git-clone.yaml b/task/git-clone/0.2/git-clone.yaml index afcd638025..32d4897dbf 100644 --- a/task/git-clone/0.2/git-clone.yaml +++ b/task/git-clone/0.2/git-clone.yaml @@ -28,7 +28,7 @@ spec: - name: revision description: git revision to checkout (branch, tag, sha, ref…) type: string - default: master + default: "" - name: refspec description: (optional) git refspec to fetch before checking out revision default: ""