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

Commit7f89135

Browse files
authored
Updating KB articles (#683)
* Updating KB articles and add missing items
1 parent6a510eb commit7f89135

File tree

24 files changed

+149
-28
lines changed

24 files changed

+149
-28
lines changed

‎_docs/kb/articles/add-link-to-parrent-from-child-pipeline.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ You'll need to simply add this step to the Child-build. For example, at the begi
5050

5151
{% endraw %}
5252

53-
![Link to Parent-build]({{site.baseurl}}/images/troubleshooting//how-to-navigate-to-parent-build-from-child-build.png)
53+
![Link to Parent-build]({{site.baseurl}}/images/troubleshooting/how-to-navigate-to-parent-build-from-child-build.png)
5454

5555
>Note:
5656
>

‎_docs/kb/articles/build-terminated-inactivity-testing-node-app.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ By default, Jest waits for any operations to be finished before exiting, which c
4343
4444
#### Quick workaround
4545
46-
A quick workaround (which is not recommended for daily usage) would be to run tests with [`--forceExit` flag](https://jestjs.io/docs/cli#--forceexit), which says to Jest to ignore open handles and exit process as soon as tests are
46+
A quick workaround (which is not recommended for daily usage) would be to run tests with [--forceExit flag](https://jestjs.io/docs/cli#--forceexit), which says to Jest to ignore open handles and exit process as soon as tests are
4747
finished.
4848
4949
#### Solution
5050
51-
Please debug and fix the app locally with [`--detectOpenHandles` flag](https://jestjs.io/docs/cli#--detectopenhandles) to find out which operations keeps Jest from exiting.
51+
Please debug and fix the app locally with [--detectOpenHandles flag](https://jestjs.io/docs/cli#--detectopenhandles) to find out which operations keeps Jest from exiting.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title:"How To: Check out only the PR merge commit, and not the HEAD of the target branch"
3+
description:
4+
group:kb
5+
sub-group:articles
6+
toc:true
7+
kb:false
8+
ht:true
9+
common:false
10+
categories:[Pipelines]
11+
support-reviewed:2023-05-04 LG
12+
---
13+
14+
##Overview
15+
16+
Sometimes, when you re-run a pipeline based on a PR you might find your tests that passed the first time failing the second time. This can happen because the default behavior of your pipeline is to run based on a merge of the PR and the HEAD of the target branch - so it includes the latest changes to HEAD that may not have present when the PR itself was first made.
17+
18+
##Details
19+
20+
If you want a pipeline to only run against the target branch as it was at the time of the pull request, you can clone your repository using the exact SHA of the merge request.
21+
22+
When Codefresh is triggered by a Pull Request, your pipeline will have access to some additional variables[1]. This includes CF_PULL_REQUEST_MERGED_COMMIT_SHA, which is the commit SHA on the base branch after the pull request was merged.
23+
24+
You can set up your pipeline to test and see if this variable exists[2], and depending on it's existence do two different clone steps. One clone as your existing clone if the variable is not there, or a second clone step if it is that uses CF_PULL_REQUEST_MERGED_COMMIT_SHA in the`revision` field of your clone step[3] to check out your codebase as it was at the exact moment of the PR with the PR merged into it.
25+
26+
##Related Items
27+
28+
[1]<https://codefresh.io/docs/docs/pipelines/variables/#github-pull-request-variables>
29+
30+
[2]<https://codefresh.io/docs/docs/kb/articles/check-env-vars-in-conditionals/>
31+
32+
[3]<https://codefresh.io/docs/docs/pipelines/steps/git-clone/#fields>

‎_docs/kb/articles/clone-target-instead-of-branch-on-pr.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ toc: true
77
kb:false
88
ht:true
99
common:false
10-
categories:[Pieplines]
10+
categories:[Pipelines]
1111
support-reviewed:2023-04-18 LG
1212
---
1313

@@ -22,7 +22,7 @@ build.
2222

2323
##Details
2424

25-
* Create a separate pipeline that uses`${{CF_PULL_REQUEST_TARGET}}`instead of the standard`${{CF_BRANCH}}` or
25+
* Create a separate pipeline that uses{% raw %}`${{CF_PULL_REQUEST_TARGET}}`{% endraw %}instead of the standard{% raw %}`${{CF_BRANCH}}`{% endraw %} or
2626
* Add the following step before your clone step to check if`CF_PULL_REQUEST_TARGET` exists, and if it does assign its value to`CF_BRANCH`:
2727

2828
{% raw %}

‎_docs/kb/articles/debug-fails-incompatible-node-module.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ toc: true
77
kb:true
88
ht:false
99
common:false
10-
categories:[Pipeline]
10+
categories:[Pipelines]
1111
support-reviewed:2023-04-18 LG
1212
---
1313

‎_docs/kb/articles/different-keys-different-branches.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ In this article, we will provide an example of using conditionals for the purpos
4949
5050
>_Notes_
5151
>
52-
>You can also make use of a single freestyle step to perform this. We would suggest using a shell script to compare`${{CF_BRANCH}}` according to your use case.
52+
>You can also make use of a single freestyle step to perform this. We would suggest using a shell script to compare{% raw %}`${{CF_BRANCH}}`{% endraw %} according to your use case.
5353
>
5454
>We suggest looking into Branch Protection from your Git provider if this is being done for access control.

‎_docs/kb/articles/docker-tagging-best-practices.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ Suggestions and best practices for Docker tags
1717

1818
##Details
1919

20-
* In general, we suggest using`{{CF_REVISION}}`or`{{CF_SHORT_REVISION}}` for your tag in addition to any other you use.
21-
* For Branches, it is suggested to prefix this with`{{CF_BRANCH}}`.
20+
* In general, we suggest using{% raw %}`{{CF_REVISION}}`{% endraw %}or{% raw %}`{{CF_SHORT_REVISION}}`{% endraw %} for your tag in addition to any other you use.
21+
* For Branches, it is suggested to prefix this with{% raw %}`{{CF_BRANCH}}`{% endraw %}.
2222
* If you are at a point where you are not making new commits (such as modifying the inline YAML only), you may instead want to consider using an alternative tag. It is not recommended to do this for anything beyond short-term testing.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title:"How To: Ensure Clean Up Commands Always Run If a Pipeline Is Manually Stopped"
3+
description:
4+
group:kb
5+
sub-group:articles
6+
toc:true
7+
kb:false
8+
ht:true
9+
common:false
10+
categories:[Pipelines]
11+
support-reviewed:2023-05-04 LG
12+
---
13+
14+
##Overview
15+
16+
Sometimes you might want to run code at the end of every pipeline (eg to clean up resources) regardless of success, failure, or the pipeline is manually stopped.
17+
18+
##Details
19+
20+
When working with a sequential (default) pipeline, you will find that manually stopping a pipeline halts the entire pipeline - including any pipeline hooks set to run on_success or on_failure[1]. However, if you switch the entire pipeline work in parallel[2], you can use the below step as a template to ensure that your clean up code will always run:
21+
22+
```yaml
23+
cleaner_always_executed:
24+
image:alpine
25+
commands:
26+
-echo "This is a step that is always executed at the end of the build. No matter what"
27+
when:
28+
condition:
29+
any:
30+
buildTerminated:workflow.result == 'terminated'
31+
buildFailed:workflow.result == 'failure'
32+
buildSuccess:workflow.result == 'success'
33+
```
34+
35+
## Related Items
36+
37+
[1] <https://codefresh.io/docs/docs/pipelines/hooks/>
38+
39+
[2] <https://codefresh.io/docs/docs/pipelines/advanced-workflows/#parallel-pipeline-mode>

‎_docs/kb/articles/error-build-service.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ A connection to the appropriate repository or YAML file cannot be made, or there
2828
* Ensure that the branch you are using has the associated YAML.
2929
* If using in-line YAML:
3030
* Fix any errors indicated in the YAML editor.
31-
* If no errors appear, ensure that any steps referenced exist. For example, if you have`working_dir` set to`${{colne}}`instead of`${{clone}}`, this error can appear.
31+
* If no errors appear, ensure that any steps referenced exist. For example, if you have`working_dir` set to{% raw %}`${{colne}}`{% endraw %}instead of{% raw %}`${{clone}}`{% endraw %}, this error can appear.
3232

3333
>_Notes_ If this still does not work, please open a ticket and include a link to the pipeline(s).

‎_docs/kb/articles/failed-to-create-container-of.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ You have a freestyle step that is failing with the following error message:
2424

2525
##Details
2626

27-
You're duplicating a mount point (`${{CF_VOLUME_PATH}} = /codefresh/volume`).
27+
You're duplicating a mount point ({% raw %}`${{CF_VOLUME_PATH}} = /codefresh/volume`{% endraw %}).
2828
For example:
2929

3030
{% raw %}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp