Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

atlassian/ssh-run:0.4.1 running a script file wont export variables

Maxim Andersen November 16, 2022

Hi,

I am running a .sh script inside atlassian/ssh-run:0.4.1 runner framework. In that script I would like to define local variables and/or export them, to be used later in the same script. However, the framework does not let me do that. Both local and exported variables are undefined when I try to use them later. For example:

 

export IMAGE_TO_DOWNLOAD=`python ./nkytestrepository/fetch_downloads_names.py --workspace wysscenter --slug ncdgui --command latest`
and then:
echo ${IMAGE_TO_DOWNLOAD}
End result, nothing is printed.

 

1 answer

0 votes
Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 22, 2022

Hi @Maxim Andersen,

Thank you for reaching out to the community.

Would you be able to confirm if you're using Bitbucket Cloud Pipelines Runners when you used the Pipes script (atlassian/ssh-run:0.4.1)?

If yes, would you be able to confirm what type of Runners are you using at the moment?

Regards,
Mark C

Maxim Andersen September 5, 2023

Yes, I am using Bitbucket Cloud Pipelines Runners, the runners are selfhosted, but the pipeline management is all cloud.

Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 6, 2023

Hi @Maxim Andersen

Since there's a new version of the Pipes script, would you be able to use the new version (atlassian/ssh-run:0.5.0) and see if you're still unable to export variables? - https://bitbucket.org/atlassian/ssh-run/src/master/

Regards,
Mark C

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events