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

Commit560cdcc

Browse files
Fix parallel (#253)
* removed skipped steps* fixing the skipped steps* more edits
1 parent189db51 commit560cdcc

File tree

1 file changed

+9
-22
lines changed

1 file changed

+9
-22
lines changed

‎_docs/codefresh-yaml/advanced-workflows.md‎

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ second_step:
231231

232232
In the example above, if integration and/or acceptance tests fail, the whole pipeline will continue, because we have defined that only the results of unit test matter for the whole parallel step.
233233

234-
The reverse relationship (i.e. defining steps to be ignored) can be defined with the following syntax
234+
The reverse relationship (i.e., defining steps to be ignored) can be defined with the following syntax
235235

236236
{% highlight yaml %}
237237
second_step:
@@ -549,13 +549,12 @@ With parallel mode you are expected to define the order of steps in the yaml fil
549549

550550
In the next sections we describe how you can define the steps dependencies in a parallel pipeline.
551551

552-
###Single Stepdependencies
552+
###Single StepDependencies
553553

554554
At the most basic level, you can define that a step*depends on* the execution of another step. This dependency is very flexible as Codefresh allows you run a second step once:
555555

556556
1. The first step is finished with success
557557
1. The first step is finished with failure
558-
1. The first step was skipped
559558
1. The first completes (regardless of exit) status
560559

561560
The syntax for this is the following post-condition:
@@ -570,7 +569,7 @@ second_step:
570569
- success
571570
{% endhighlight %}
572571

573-
If you want to run the second step only if the first one fails the syntax is:
572+
If you want to run the second step only if the first one fails the syntax is:
574573

575574
{% highlight yaml %}
576575
second_step:
@@ -582,18 +581,6 @@ second_step:
582581
- failure
583582
{% endhighlight %}
584583

585-
If you want to run the second step only if the first one was skipped (because its own condition said so) :
586-
587-
{% highlight yaml %}
588-
second_step:
589-
title: Second step
590-
when:
591-
steps:
592-
- name: first_step
593-
on:
594-
- skipped
595-
{% endhighlight %}
596-
597584
Finally, if you don't care about the completion status the syntax is:
598585

599586
{% highlight yaml %}
@@ -606,15 +593,15 @@ second_step:
606593
- finished
607594
{% endhighlight %}
608595

609-
Notice that`success` is the default behavior so if you omit the last two lines (i.e. the`on:` part) the second step
596+
Notice that`success` is the default behavior so if you omit the last two lines (i.e., the`on:` part) the second step
610597
will wait for the next step to run successfully.
611598

612599
>Also notice that the name`main_clone` is reserved for the automatic clone that takes place in the beginning of pipelines that are linked to a git repository. You need to define which steps depend on it (probably the start of your graph) so that`git checkout` happens before the other steps.
613600
614601
As an example, let's assume that you have the following steps in a pipeline:
615602

616-
1. A build step that creates adocker image
617-
1. A freestyle step that runs[unit tests]({{site.baseurl}}/docs/testing/unit-tests/) inside thedocker image
603+
1. A build step that creates aDocker image
604+
1. A freestyle step that runs[unit tests]({{site.baseurl}}/docs/testing/unit-tests/) inside theDocker image
618605
1. A freestyle step that runs[integrations tests]({{site.baseurl}}/docs/testing/integration-tests/)*After* the unit tests, even if they fail
619606
1. A cleanup step that runs after unit tests if they fail
620607

@@ -800,7 +787,7 @@ steps:
800787
In this case Codefresh will make sure that cleanup happens only when both unit and integration tests are finished.
801788

802789

803-
###Customsteps dependencies
790+
###CustomSteps Dependencies
804791

805792
For maximum flexibility you can define a custom conditional for a step.
806793

@@ -861,8 +848,8 @@ my_step:
861848
when:
862849
condition:
863850
any:
864-
myCondition: steps.MyLoadTesting.result ==success
865-
myOtherCondition: steps.MyCleanupStep.result ==skipped
851+
myCondition: steps.MyLoadTesting.result =='success'
852+
myOtherCondition: steps.MyCleanupStep.result =='finished'
866853
{% endhighlight %}
867854

868855
You can also use conditions in the success criteria for a parallel step. Here is an example

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp