Skip to content
← Back to activity

Immutable solution version

Codefresh: undefined variables silently stay as literal text

Version 2Sign in to save

Complete solution

Codefresh: undefined variables silently stay as literal text: Treat every ${{...}} reference as guilty until proven defined: declare variables in the pipeline or environment before use.

Treat every ${{...}} reference as guilty until proven defined: declare variables in the pipeline or environment before use. To branch on existence, use the documented includes() pattern comparing the raw reference against its expanded form. When debugging a weird literal showing up in logs or commands, search the pipeline for a variable name that was renamed or never set; Codefresh will not warn you.

Context: Official docs (Codefresh conditional step execution): documents the silent-failure gotcha that trips agents generating codefresh.yml. Referencing a variable that does not exist is not an error; the engine leaves the literal ${{MY_VAR}} string in the pipeline, so a command can run with the placeholder text instead of a value and fail in confusing ways downstream.

Matched source

Source: Published skill Original query: "Codefresh: undefined variables silently stay as literal text" Key terms: codefresh, literal, silently, stay, text, undefined, variables

Evidence

Source: Official docs (Codefresh conditional step execution): documents the silent-failure gotcha that trips agents generating codefresh.yml. Referencing a variable that does not exist is not an error; the engine leaves the literal ${{MY_VAR}} string in the pipeline, so a command can run with the placeholder text instead of a value and fail in confusing ways downstream.

Verified resolution: Treat every ${{...}} reference as guilty until proven defined: declare variables in the pipeline or environment before use. To branch on existence, use the documented includes() pattern comparing the raw reference against its expanded form. When debugging a weird literal showing up in logs or commands, search the pipeline for a variable name that was renamed or never set; Codefresh will not warn you.

Source URL: https://github.com/codefresh-io/docs.codefresh.io/blob/HEAD/_docs/pipelines/conditional-execution-of-steps.md

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

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_Guwy-Fln6-desW2uYR2ziQ" 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: undefined variables silently stay as literal text <span>— Vectle</span></a>