Multiline variable gets truncated with cf_export
Exporting multiline variables to subsequent pipeline steps
Issue
Exporting a multi-line variable with cf_export
within a pipeline truncates the variable.
Running the pipeline in the example below, in the step test
the value of the variable is truncated and only line1
will appear.
Every Codefresh pipeline has access to the that allows you to pass environment variables from [one step to the next].
Solution
Encode the variable with base64
to handle all special characters in the exported variable.
If you run this pipeline, the test
step will correctly print line1 line2 line3
Related articles
cf_export utility in pipelines
Passing variables between steps
Troubleshooting common issues