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

How to pass big amount of deployment variables across steps

Vadym Polietaiev October 2, 2023

I have big amount of variable for each deployment (more then 200 for each), how to pass all deployment variable through steps correctly?

option with export each variable into artifact is not ok when you have good amount of variables.
(also it is not very good to remember that besides of add to bitbucket deployment page  new variable, you need to add export of it in to artifact in the pipline file).

I try to use printenv output on deployment step into artifact (for future source of this artifact file in needed step), but some variable have space, some could be array. 
So it is not very confident and secure way (with parsing  artifact file to correct all this moments before source).

Exist some correct way to do it?

 

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 3, 2023

Hi Vadym,

You could use the stage option in your yml file to group steps, and then specify a deployment environment for the stage.

For example, if you have a pipeline like the following, the deployment variables of staging will be available to both the second and the third step of the pipeline.

pipelines:
default:
- step:
name: Build and test
script:
- sh ./build-app.sh
- stage:
name: Deploy to staging
deployment: staging
steps:
- step:
name: Deploy
script:
- sh ./deploy-app.sh
- step:
name: Run end-to-end tests
script:
- sh ./run-e2e-tests.sh

You can read more about stages here:

Does this work for you? Please feel free to reach out if you have any questions.

Kind regards,
Theodora

Vadym Polietaiev October 4, 2023

yes, I am now trying to somehow use this for this case, but limitation on parallel step make this very problematic.

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 4, 2023

Hi Vadym,

Parallel steps are indeed not supported for stages yet. We have this feature request in our issue tracker, you can add your vote and feedback to it to express your interest:

Kind regards,
Theodora

Suggest an answer

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

Atlassian Community Events