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

Commitc59c824

Browse files
added full example for git submodules
1 parent2fc34de commitc59c824

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

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

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,50 @@ steps:
312312
The GitHub token can be either defined in the pipeline on its own as an environment variable, or fetched from
313313
the existing [GIT integration]({{site.baseurl}}/docs/integrations/git-providers/) as shown in the previous section.
314314
315+
Here is full pipeline example:
316+
317+
`codefresh.yml`
318+
{% highlight yaml %}
319+
{% raw %}
320+
version:'1.0'
321+
stages:
322+
-checkout
323+
-prepare
324+
-build
325+
steps:
326+
clone:
327+
title:Cloning the repository
328+
type:git-clone
329+
stage:checkout
330+
arguments:
331+
repo:'${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}'
332+
git:github
333+
revision:'${{CF_REVISION}}'
334+
335+
updateSubmodules:
336+
image:codefresh/cfstep-gitsubmodules
337+
stage:prepare
338+
working_directory:'${{clone}}'
339+
environment:
340+
-GITHUB_TOKEN=${{MY_GITHUB_TOKEN}}
341+
docker_build:
342+
title:Building docker image
343+
type:build
344+
stage:build
345+
working_directory:'${{clone}}/k8s/docker'
346+
tag:current
347+
disable_push:true
348+
image_name:'my-docker-image'
349+
350+
{% endraw %}
351+
{% endhighlight %}
352+
353+
This pipeline does the following:
354+
355+
1. Clones the main source code
356+
1. Updates submodules
357+
1. Creates a docker image
358+
315359

316360
## Use an SSH key with Git
317361

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp