Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions _data/home-content.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,24 +83,24 @@
icon: images/home-icons/pipeline.svg
url: ''
links:
- title: Introduction to Pipelines
localurl: /docs/pipelines/introduction-to-codefresh-pipelines/
- title: Creating Pipelines
localurl: /docs/pipelines/pipelines/
- title: Pipeline triggers
localurl: /docs/pipelines/triggers/
- title: Monitoring pipelines
localurl: /docs/pipelines/monitoring-pipelines/
- title: Shared Configuration
localurl: /docs/pipelines/shared-configuration/
- title: Using secrets
localurl: /docs/pipelines/secrets-store/
- title: Pipeline caching
localurl: /docs/pipelines/pipeline-caching/
- title: Running pipelines locally
localurl: /docs/pipelines/running-pipelines-locally/
- title: Debugging pipelines
localurl: /docs/pipelines/debugging-pipelines/
- title: Introduction to Pipelines
localurl: /docs/pipelines/introduction-to-codefresh-pipelines/
- title: Creating Pipelines
localurl: /docs/pipelines/pipelines/
- title: Pipeline triggers
localurl: /docs/pipelines/triggers/
- title: Monitoring pipelines
localurl: /docs/pipelines/monitoring-pipelines/
- title: Shared Configuration
localurl: /docs/pipelines/shared-configuration/
- title: Using secrets
localurl: /docs/pipelines/secrets-store/
- title: Pipeline caching
localurl: /docs/pipelines/pipeline-caching/
- title: Running pipelines locally
localurl: /docs/pipelines/running-pipelines-locally/
- title: Debugging pipelines
localurl: /docs/pipelines/debugging-pipelines/


- title: Workflows
Expand Down
54 changes: 53 additions & 1 deletion _data/nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,59 @@
url: "/shared-configuration"



- title: Troubleshooting
url: "/troubleshooting"
pages:
- title: Common Issues
url: "/common-issues"
sub-pages:
- title: Can't find your organization repositories
url: "/cant-find-your-organization-repositories"
- title: Can’t find your private repositories
url: "/cant-find-your-private-repositories"
- title: 'Clone step failed: Command [git checkout $REVISION] exited with code [1]'
url: "/git-clone-step-issue"
- title: Handling commit messages with a quote character
url: "/handling-commit-messages-with-quotes"
- title: Docker image does not exist or no pull access
url: "/the-docker-image-does-not-exist-or-no-pull-access"
- title: 'Build step: No such file or directory'
url: "/build-step-no-such-file-or-directory"
- title: No Dockerfile found
url: "/no-dockerfile-found"
- title: Failed to tag image
url: "/could-not-tag-image"
- title: Error Code 137
url: "/error-code-137"
- title: Too many requests
url: "/dockerhub-rate-limit"
- title: Restoring data from pre-existing image hangs on
url: "/restoring-data-from-pre-existing-image-hangs-on"
- title: Disabling codefresh caching mechanisms
url: "/disabling-codefresh-caching-mechanisms"
- title: Pinning codefresh.yml for multi-git triggers
url: "/multi-git-triggers"
- title: Workflow terminated by the system
url: "/workflow-terminated-by-system"
- title: cf_export limitations
url: "/cf-export-limitations"
- title: Validation port warnings
url: "/validation-port-warnings"
- title: Forbidden Kubernetes resources
url: "/forbidden-cluster-resources"
- title: How to use SSH keys in freestyle steps
url: "using-ssh-keys"
- title: Failed to get accounts clusters during workflow
url: "/failed-to-get-accounts-clusters-during-workflow"
- title: Paging issues for builds and images
url: "/paging-issues-builds-images"
- title: Git step migration
url: "/git-step-migration"
- title: Personal Git Deprecation
url: "/personal-git-deprecation"
- title: GitOPs runtimes
url: "/runtime-issues"


- title: Terms and Privacy Policy
url: "/terms-and-privacy-policy"
Expand Down
152 changes: 152 additions & 0 deletions _docs/git-step-migration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
---
title: "Projects require git clone steps"
description: "Migrating from implicit to explicit git clone steps"
group: troubleshooting
toc: true
---


On May 2019, Codefresh introduced **Projects** as a way to group pipelines, instead of using *Repositories*. If you create a Codefresh account after this date, then you only get access to Projects and all the pipelines you create are under projects.

If, however, you have an existing Codefresh account, you will still get access to both dashboards (Projects and repositories) and you can work create/edit pipelines using both methods.


## Git steps are now required

If you visit any existing pipeline you will see a warning message about git-clone steps.

{% include image.html
lightbox="true"
file="/images/troubleshooting/migration/clone-warning.png"
url="/images/troubleshooting/migration/clone-warning.png"
alt="Git clone warning on existing pipeline"
caption="Git clone warning on existing pipeline"
max-width="80%"
%}

First of all, we need to make clear that **your pipeline will still work as before, without any changes**. The migration to projects is a gradual one and Codefresh does not force you to do anything in order to make things work.

The warning message explains how new pipelines need a git-clone step. Codefresh pipelines based on repositories automatically cloned the source code for you.

{% include image.html
lightbox="true"
file="/images/troubleshooting/migration/automatic-git-clone.png"
url="/images/troubleshooting/migration/automatic-git-clone.png"
alt="Automatic git clone step in repository based pipelines"
caption="Automatic git clone step in repository based pipelines"
max-width="60%"
%}

This means that the repository-based pipelines used to check out the code automatically, and all subsequent pipeline steps could start work with it right away.

`codefresh.yml` (old syntax)
{% highlight yaml %}
{% raw %}
version: '1.0'
steps:
# Code is already checked out. All files are visible
PrintFileList:
title: 'Listing files'
image: alpine:latest
commands:
- 'ls -l'
{% endraw %}
{% endhighlight %}

For new pipelines this is no longer true. You need to add an [explicit clone step]({{site.baseurl}}/docs/codefresh-yaml/steps/git-clone/). The step should be named `main_clone`.

Here is the same pipeline in a project. The only thing you need to do is to add the `main_clone` segment before other steps:

`codefresh.yml` (new syntax)
{% highlight yaml %}
{% raw %}
version: '1.0'
steps:
main_clone:
title: 'Cloning main repository...'
type: git-clone
repo: '${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}'
revision: '${{CF_REVISION}}'
git: my-git-provider
PrintFileList:
title: 'Listing files'
image: alpine:latest
commands:
- 'ls -l'
{% endraw %}
{% endhighlight %}

The values for `CF_REPO_OWNER`, `CF_REPO_NAME`, `CF_REVISION` will automatically be filled by Codefresh according to the trigger the pipeline has. Make sure to replace the `my-git-provider` value with your own git provider as defined in [git integrations]({{site.baseurl}}/docs/integrations/git-providers/).

{% include image.html
lightbox="true"
file="/images/troubleshooting/migration/pipeline-triggers.png"
url="/images/troubleshooting/migration/pipeline-triggers.png"
alt="Triggers connected to pipeline"
caption="Triggers connected to pipeline"
max-width="60%"
%}

When you run your pipeline, you can select the trigger that will be used to fill in the values of all the Codefresh variables.


{% include image.html
lightbox="true"
file="/images/troubleshooting/migration/trigger-simulate.png"
url="/images/troubleshooting/migration/trigger-simulate.png"
alt="Use trigger to fill in CF values"
caption="Use trigger to fill in CF values"
max-width="60%"
%}



## Why projects are better

Git clone steps are now required because pipelines are no longer bound to specific git repositories. Creating pipelines in the old way was restricting in the sense that all pipelines had to be connected to a specific git repository.

{% include image.html
lightbox="true"
file="/images/troubleshooting/migration/monolithic-pipelines.png"
url="/images/troubleshooting/migration/monolithic-pipelines.png"
alt="Pipeline limited to a single GIT repository"
caption="Pipeline limited to a single GIT repository"
max-width="50%"
%}

This made pipeline re-use very difficult. With the new project grouping the pipeline is not linked to specific repository. Instead it gets all information from triggers.

{% include image.html
lightbox="true"
file="/images/troubleshooting/migration/add-new-microservice.png"
url="/images/troubleshooting/migration/add-new-microservice.png"
alt="Reusing pipelines for microservices"
caption="Reusing pipelines for microservices"
max-width="50%"
%}

This means that you can easily re-use a single pipeline among different microservices by just adding more triggers.

If for some reason you still want a pipeline that always works against a specific git repository regardless of the trigger, then you can hard-code the details in the git clone step like below:


`codefresh.yml`
{% highlight yaml %}
{% raw %}
version: '1.0'
steps:
main_clone:
title: 'Cloning main repository...'
type: git-clone
repo: 'my-github-username/foo'
revision: 'master'
git: my-github-integration
PrintFileList:
title: 'Listing files'
image: alpine:latest
commands:
- 'ls -l'
{% endraw %}
{% endhighlight %}

The pipeline above will always checkout project `foo` regardless of the trigger that was used in order to launch it.
55 changes: 55 additions & 0 deletions _docs/troubleshooting/common-issues.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
title: "Common issues"
description: ""
group: troubleshooting
redirect_from:
- /docs/common-issues/
- /docs/troubleshooting/
toc: true
---
In this section, we offer helpful information about issues you may encounter and questions you might have.


## Repository issues

- [Can't find your organization repositories]({{site.baseurl}}/docs/troubleshooting/common-issues/cant-find-your-organization-repositories/)
- [Can't find your private repositories]({{site.baseurl}}/docs/troubleshooting/common-issues/cant-find-your-private-repositories/)
- [Clone step failed]({{site.baseurl}}/docs/troubleshooting/common-issues/git-clone-step-issue/)
- [Handling commit messages with quotes]({{site.baseurl}}/docs/troubleshooting/common-issues/handling-commit-messages-with-quotes/)

## Docker issues

- [The docker image does not exist or no pull access]({{site.baseurl}}/docs/troubleshooting/common-issues/the-docker-image-does-not-exist-or-no-pull-access/)
- [Build step: No such file or directory]({{site.baseurl}}/docs/troubleshooting/common-issues/build-step-no-such-file-or-directory/)
- [No Dockerfile found]({{site.baseurl}}/docs/troubleshooting/common-issues/no-dockerfile-found/)
- [Could not tag image](could-not-tag-image)
- [Failed to build image: non-zero code 137](error-code-137/)
- [Error pulling image configuration: toomanyrequests](dockerhub-rate-limit/)

## Build/pipeline issues

- [Restoring data from pre-existing image hangs on]({{site.baseurl}}/docs/troubleshooting/common-issues/restoring-data-from-pre-existing-image-hangs-on/)
- [Disabling codefresh caching mechanisms]({{site.baseurl}}/docs/troubleshooting/common-issues/disabling-codefresh-caching-mechanisms/)
- [Pinning codefresh.yml for multi-git triggers]({{site.baseurl}}/docs/troubleshooting/common-issues/multi-git-triggers/)
- [Workflow process terminated by the system]({{site.baseurl}}/docs/troubleshooting/common-issues/workflow-terminated-by-system/)
- [Multi-line variable gets truncated with cf_export](cf-export-limitations)

## Dynamic environment issues

- [Validation Port warnings]({{site.baseurl}}/docs/troubleshooting/common-issues/validation-port-warnings/)

## Deployment issues

- [Forbidden Cluster Resources]({{site.baseurl}}/docs/troubleshooting/common-issues/forbidden-cluster-resources/)
- [Failed to get accounts clusters during workflow]({{site.baseurl}}/docs/troubleshooting/common-issues/failed-to-get-accounts-clusters-during-workflow/)

## API/CLI issues

- [Paging does not work for images and builds]({{site.baseurl}}/docs/troubleshooting/common-issues/paging-issues-builds-images/)







Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
title: "Build step: No such file or directory"
description: ""
group: troubleshooting
sub_group: common-issues
permalink: /:collection/troubleshooting/common-issues/build-step-no-such-file-or-directory/
redirect_from:
- /docs/build-step-no-such-file-or-directory/
toc: true
---

## Issue

Following error in the logs of the build step:

`Text`
{% highlight text %}
Step 3/6 : COPY /output /app
lstat output: no such file or directory
{% endhighlight %}

## Possible cause
This issue generally occurs if you use an incorrect path to the Dockerfile or to the Build context.

## Solution
Recheck, and use the correct path to Dockerfile and Build context

{:start="1"}
1. The path to Dockerfile.

{:start="2"}
2. The path to Build context.
**Build context** is where we can find your Dockerfile as well as running commands. Your Dockerfile must be relative to this directory.

{% include
image.html
lightbox="true"
file="/images/troubleshooting/no_such_file_directory.png"
url="/images/troubleshooting/no_such_file_directory.png"
alt="codefresh_no_such_file_directory.png"
max-width="40%"
%}

{{site.data.callout.callout_info}}
In case with codefresh.yml, to specify the path to build context you need to use `working_directory`
{{site.data.callout.end}}

`build step`
{% highlight yaml %}
step_name:
type: build
title: Step Title
description: Free text description
working_directory: path/to/buildcontext
dockerfile: path/to/Dockerfile
image_name: owner/new-image-name
tag: develop
{% endhighlight %}

## Related articles
[Troubleshooting common issues]({{site.baseurl}}/docs/troubleshooting/common-issues)
Loading