Source error on setting environment variables

I have two sh files in my concourse pipeline - tasks where I am trying to export the variable from one sh file to another sh file.I have followed the below steps.when I am sourcing from my mac terminal I am able to use the variable setup in to the pipeline in concourse has two tasks where first task runs the and second task runs can I source the script file in concourse pipelines.
#!/usr/bin/env bash
export test=${test}
echo ${test}

If I understand you correctly you have something like (pseudo code):

- get: resource1
- get: resource2
- task: task1
  file: resource1/
- task: task2
  file: resource2/

but actually needs to source If resource1 and resource2 are the same (i.e. both scripts are in the same repo) or both resources are inputs to task2 then you should be able to just modify to be something like:

source path/to/
echo ${test}

Does this help?

yes this helped me.thanks very much

This is helpful Thanks for sharing

Hi Rekha,
I’m new to concourse can u please help me out with the how to configure tools like MS Build , Nuget, in concourse setup