You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _docs/codefresh-yaml/steps/git-clone.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,9 +9,9 @@ toc: true
9
9
---
10
10
Clones a Git repository to the filesystem.
11
11
12
-
A pipeline can have any number of git clone steps (even none). You cancheckout code from any private or public repository. Cloning a repository is not constrained to the trigger of a pipeline. You can trigger a pipeline from a commit that happened on Git repository A while the pipeline is checking out code from Git Repository B.
12
+
A pipeline can have any number of git clone steps (even none). You cancheck out code from any private or public repository. Cloning a repository is not constrained to the trigger of a pipeline. You can trigger a pipeline from a commit that happened on Git repository A while the pipeline is checking out code from Git Repository B.
13
13
14
-
>Notice that if you are an existing customer before May 2019, Codefresh will automaticallycheckout the code from a[connected git repository]({{site.baseurl}}/docs/integrations/git-providers/) when a pipeline is created on that repository. In this case an implicit git clone step is included in your pipeline. You can still override it with your own git clone step as explained in this page
14
+
>Notice that if you are an existing customer before May 2019, Codefresh will automaticallycheck out the code from a[connected git repository]({{site.baseurl}}/docs/integrations/git-providers/) when a pipeline is created on that repository. In this case an implicit git clone step is included in your pipeline. You can still override it with your own git clone step as explained in this page
15
15
16
16
##Usage
17
17
@@ -23,6 +23,7 @@ step_name:
23
23
description: Step description
24
24
working_directory: /path
25
25
repo: owner/repo
26
+
depth: 3
26
27
git: my-git-provider
27
28
revision: abcdef12345'
28
29
use_proxy: false
@@ -55,6 +56,9 @@ step_name:
55
56
|`git`| The name of the[git integration]({{site.baseurl}}/docs/integrations/git-providers/) you want to use. If left empty, Codefresh will attempt to use the git provider that was used during account sign-up. Note that this might have unexpected results if you are changing your Git integrations.| Required|
56
57
|`repo`| path of the repository without the domain name in the form of`my_username/my_repo`| Required|
57
58
|`revision`| The revision of the repository you are checking out. It can be a revision hash or a branch name. The default value is the branch you have specified in your Git provider (e.g`master` or`main`).| Default|
59
+
|`depth`| The number of commits to pull from the repo to create a shallow clone. Creating a shallow clone truncates the history to the number of commits specified, instead of pulling the entire history. See also`single-branch` and`no-single-branch`.| Optional|
60
+
|`no-single-branch`| Fetches the histories near the tips of all branches, instead of the`single-branch` when shallow clone is specified through`depth`. See also`single-branch`.| Optional|
61
+
|`single-branch`| Clones only the branch specified by the`branch` parameter. See also`no-single-branch`.| Optional|
58
62
|`use_proxy`| If set to true the Git clone process will honor`HTTP_PROXY` and`HTTPS_PROXY` variables if present for[working via a proxy](#using-git-behind-a-proxy). Default value is`false`.| Default|
59
63
|`credentials`| Credentials to access the repository, if it requires authentication. It can an object containing`username` and`password` fields. Credentials are optional if you are using the[built-in git integrations]({{site.baseurl}}/docs/integrations/git-providers/) .| Optional|
60
64
|`fail_fast`| If a step fails and the process is halted. The default value is`true`.| Default|