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

Edit env vars when manually triggering pipelines

Pablo Sanchez
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 22, 2021

Hi all,

It's quite rare to have to trigger a pipeline manually once it's 100% setup. But sometimes you need an emergency build or need to change a variable just to make an experimental build (like, changing endpoints for a beta testing build which you don't want to accidentally make permanent by forgetting to remove it).

It would be nice to, as admin of the repo, when manually triggering a pipeline, to be able to overwrite a variable for experimental purposes.

What do you guys think?

PS: I know I can just declare a pipeline for a specific branch and do ifs and elses to read different variables, but it's just too much manual work when all you want to make sure is that the new keys or tokens for a remote service are already operational before replacing the old ones in the pipeline, no? :-)

Any thoughts are welcome and I hope this becomes a feature at least for admins triggering manually the pipelines so we can do experimental builds with lower risk of leaving  something behind.

Cheers,

Pablo Sanchez  

1 comment

Oleksandr Kyrdan
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 24, 2021

Hi @Pablo Sanchez ,

Good idea. 

Some of you cases you could cover with the custom variables functionality:

[Custom pipelines only] Contains variables that are supplied when a pipeline is launched. To enable the variables, define them under the custom pipeline that you want to enter when you run the pipeline:

Example

pipelines:
custom:
custom-name-and-region: #name of this pipeline
- variables: #list variable names under here
- name: Username
- name: Region
- step:
script:
- echo "User name is $Username"
- echo "and they are in $Region"

Then, when you run a custom pipeline by accessing Branches ⋯ Run pipeline for a branch > Custom, you can set the variable values to run your custom pipeline.

The keyword variables can also be part of the definition of a service.

 

Best regards,
Oleksandr Kyrdan

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events