How do I define an environment variable inside a step for other steps to use?

Files are the easiest approach as the /workspace directory is shared with all steps. So write in one step and use the value from other steps etc.

The other option is mounting a ConfigMap as environment variables into each step and modifying that on one step; but files are easier really.

1 Like