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

Commit829c38d

Browse files
committed
Edit how to articles
1 parent0ce8c6d commit829c38d

File tree

2 files changed

+21
-12
lines changed

2 files changed

+21
-12
lines changed

‎_docs/kb/articles/mount-volumes-in-composition-step.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ steps:
9494
```
9595
{% endraw %}
9696

97-
In the`conform`step, `.arguments.KEYVALUE_PAIRS`:
98-
* Volumes mount is replacedto {% raw %}`${{CF_VOLUME_NAME}}:${{CF_VOLUME_PATH}}`{% endraw %}.
97+
In the step `conform.arguments.KEYVALUE_PAIRS`:
98+
* Volumes mount is replacedby {% raw %}`${{CF_VOLUME_NAME}}:${{CF_VOLUME_PATH}}`{% endraw %}.
9999
* The command {% raw %}`bash -c "ln -s ${{CF_VOLUME_PATH}}/${{CF_REPO_NAME}}/<DIR>/ /database && ./start.sh"`{% endraw %}:
100100
* Symlinks the directory in the Git repo to the `/database` directory
101101
* Executes the script already in the container

‎_docs/kb/articles/run-step-build-trigger-by-webhook.md‎

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title:"How To: Run a stepdepending on if thebuildis webhook triggered"
2+
title:"How To: Run a stepconditionally forbuildtriggered by webhook"
33
description:
44
group:kb
55
sub-group:articles
@@ -11,16 +11,24 @@ categories: [Pipelines]
1111
support-reviewed:2023-04-18 LG
1212
---
1313

14-
##Overview
1514

16-
You wantto run a steponly ifthe build isdirectlytriggered by a webhook event, or only if it's started manually.
15+
This article explains howto run a stepconditionally based on whetherthe build is triggered by a webhook event or manually.
1716

18-
For example, you may have your Slack notifications set up as steps using the[Slack notifier plugin](https://codefresh.io/steps/step/slack-notifier) within your pipeline in order to get more granular control over when and how these notifications are sent, and you want to send these notifications only if the build is automatically started via webhook, not when the build is manually
17+
18+
##Conditional execution of steps
19+
20+
You want to execute a step only when a specfic condition is met.
21+
22+
For example, to get more granular control over when and how Slack notifications are sent, you may have your Slack notifications set up as steps using the[Slack notifier plugin](https://codefresh.io/steps/step/slack-notifier){:target="\_blank"} within your pipeline.
23+
24+
You want to send these notifications only when the build is automatically triggerd via webhook, and not when it is manually
1925
triggered.
2026

21-
##Details
27+
##How to
28+
29+
To execute a step only when a build is manually triggered, you can create a condition to check for the value of the[system variable]({{site.baseurl}}/docs/pipelines/variables/#system-provided-variables)`CF_BUILD_TRIGGER`.
2230

23-
To execute a step only when a build is manually triggered, you can create a condition to check for the value of the[system-provided variable]({{site.baseurl}}/docs/pipelines/variables/#system-provided-variables)`CF_BUILD_TRIGGER`.This variable's valuewill be`webhook`if the buildwas started by a webhook event, and`build`if it was startedmanually(through UI, CLI, or API).
31+
This variable's valueis`webhook`when the buildis triggered by a webhook event, and`build`when triggeredmanually throughtheUI, CLI, or API.
2432

2533
{% raw %}
2634

@@ -40,11 +48,13 @@ steps:
4048
4149
{% endraw %}
4250
43-
Similarly, you can match for the value`build` if you wantto execute a step only if the build is manually initiated.
51+
Conversely,to execute a step only if the build is manually initiated, you can set a condition to match the value`build`.
4452

45-
In child builds started with codefresh run, the value of `CF_BUILD_TRIGGER` will always be `build`. This is because although the parent build may be webhook-triggered, the child build is always started via API, which counts as a "manual" start.
53+
##### Child builds
54+
In child builds started with Codefresh run, the value of `CF_BUILD_TRIGGER` will always be `build`.
55+
This is because although the parent build may be webhook-triggered, the child build is always started via API, which is considered as a "manual" start.
4656

47-
To get around this, you can explicitly pass this variable from the parent to the child build to override the default value.
57+
As a workaround, you can explicitly pass this variable from the parent to the child build to override the default value.
4858

4959
{% raw %}
5060

@@ -57,5 +67,4 @@ steps:
5767
VARIABLE:
5868
- CF_BUILD_TRIGGER=${{CF_BUILD_TRIGGER}}
5969
```
60-
6170
{% endraw %}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp