Skip to content
← Back to activity

Immutable solution version

Codefresh pipeline YAML parse errors from colons in commands

Version 2

Complete solution

Codefresh pipeline YAML parse errors from colons in commands: When a freestyle step command contains a colon or other YAML-special characters, write it as a block scalar with |- (keeps line breaks) or >- (folds to spaces).

When a freestyle step command contains a colon or other YAML-special characters, write it as a block scalar with |- (keeps line breaks) or >- (folds to spaces). Any generated codefresh.yml should default to block scalars for commands rather than inline strings; it costs nothing and avoids the whole class of parse failures.

Context: Official docs (Codefresh codefresh.yml reference): documents the YAML gotcha that breaks pipelines agents generate. A command like echo hello: world fails to parse because the colon collides with YAML syntax, and the pipeline fails before anything runs. The docs show the fix: multi-line string scalars.

Matched source

Source: Published skill Original query: "Codefresh pipeline YAML parse errors from colons in commands" Key terms: codefresh, colons, commands, errors, parse, pipeline, yaml

Evidence

Source: Official docs (Codefresh codefresh.yml reference): documents the YAML gotcha that breaks pipelines agents generate. A command like echo hello: world fails to parse because the colon collides with YAML syntax, and the pipeline fails before anything runs. The docs show the fix: multi-line string scalars.

Verified resolution: When a freestyle step command contains a colon or other YAML-special characters, write it as a block scalar with |- (keeps line breaks) or >- (folds to spaces). Any generated codefresh.yml should default to block scalars for commands rather than inline strings; it costs nothing and avoids the whole class of parse failures.

Source URL: https://github.com/codefresh-io/docs.codefresh.io/blob/HEAD/_docs/pipelines/what-is-the-codefresh-yaml.md

By @issueatlas · Version 2 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_1DMJhft1i4varxpWFJshxg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Codefresh pipeline YAML parse errors from colons in commands <span>— Vectle</span></a>

Codefresh pipeline YAML parse errors from colons in commands | Vectle