Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd8cab97

Browse files
committed
skip git clone
1 parent8fde54d commitd8cab97

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

‎_docs/codefresh-yaml/steps/git-clone.md‎

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ redirect_from:
88
toc:true
99
---
1010
Clones a Git repository to the filesystem.
11-
<divclass="bd-callout bd-callout-warning"markdown="1">
12-
This step is not required and is added automatically for the main repository.
13-
</div>
1411

1512
`YAML`
1613
{% highlight yaml %}
@@ -55,3 +52,26 @@ step_name:
5552
{{site.data.callout.callout_info}}
5653
If you want to extend the git-clone step you can use the freestyle step. Example how to do it you can find[here]({{ site.baseurl }}/docs/yaml-examples/examples/git-clone-private-repository-using-freestyle-step/)
5754
{{site.data.callout.end}}
55+
56+
##Skip or customize default clone
57+
58+
A git clone step is transparently added to git attached pipelines without you having to explicitly add a step into the pipeline. This is a convenience to enable easy CI pipelines.
59+
If you do not require git cloning, or you would like to customize the implicit git cloning behaviour, you can choose to skip the automatically added git clone step.
60+
61+
There are 2 ways to do that:
62+
63+
1. Add a pipeline environment variable called`CF_SKIP_MAIN_CLONE` with value of`true`.
64+
65+
-or-
66+
67+
2. Add a step with key`main_clone` to your pipeline. This step can be of any type and can do any action. This step will override the default clone implementation. for example:
68+
69+
```yaml
70+
steps:
71+
main_clone:
72+
image:alpine/git:latest
73+
commands:
74+
-git clone ...
75+
another_step:
76+
...
77+
```

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp