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

Update git-clone task and document changes in behaviour #427

Merged
merged 1 commit into from
Sep 11, 2020
Merged
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
1 change: 0 additions & 1 deletion task/git-clone/0.1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

2 changes: 1 addition & 1 deletion task/git-clone/0.1/git-clone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
23 changes: 10 additions & 13 deletions task/git-clone/0.2/README.md
Original file line number Diff line number Diff line change
@@ -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:

Expand Down Expand Up @@ -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)
Expand All @@ -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)
2 changes: 1 addition & 1 deletion task/git-clone/0.2/git-clone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ""
Expand Down