You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _docs/codefresh-yaml/variables.md
+11-2Lines changed: 11 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -247,14 +247,23 @@ steps:
247
247
{% endraw %}
248
248
{% endhighlight %}
249
249
250
-
Notice that`cf_export` has the samesemantics as the[bash export command](https://www.gnu.org/software/bash/manual/html_node/Environment.html). This means that when you use it you**don't** need any dollar signs for the variable created/assigned.
250
+
Notice that`cf_export` has the samesyntax structure as the[bash export command](https://www.gnu.org/software/bash/manual/html_node/Environment.html). This means that when you use it you**don't** need any dollar signs for the variable created/assigned.
251
251
252
252
```
253
253
cf_export $MY_VAR # Don't do this
254
254
cf_export MY_VAR # Correct syntax
255
255
```
256
256
257
-
>There is nothing really magic about`cf_export`. It is a normal script. You can see its contents on your own by entering the command`cat /codefresh/volume/cf_export` on any[Codefresh freestyle step]({{site.baseurl}}/docs/codefresh-yaml/steps/freestyle/) inside a pipeline. For more information on its limitations see the[troubleshooting page]({{site.baseurl}}/docs/troubleshooting/common-issues/cf-export-limitations/).
257
+
Also notice that`cf_export` works on*subsequent* steps only. If you want to export a variable right away in the present step and all the rest of the steps you need to do the following:
258
+
259
+
```
260
+
export MY_VAR='example' # Will make MY_VAR available in this step only
261
+
cf_export MY_VAR='example' # Will also make MY_VAR available to all steps after this one
262
+
```
263
+
264
+
There is nothing really magic about`cf_export`. It is a normal script. You can see its contents on your own by entering the command`cat /codefresh/volume/cf_export` on any[Codefresh freestyle step]({{site.baseurl}}/docs/codefresh-yaml/steps/freestyle/) inside a pipeline.
265
+
266
+
For more information on its limitations see the[troubleshooting page]({{site.baseurl}}/docs/troubleshooting/common-issues/cf-export-limitations/).