Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

conditional TASK_DEFINITION variable in pipe

rushabh
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!
December 5, 2023

I want to create new task definition only when some environment variable in the files is updated. Pipe has variable TASK_DEFINITION which i am conditionally setting via script. If TASK_DEFINITION is empty i don't want to create new revision. Just do a force deployment. how can i achieve this?

1 answer

0 votes
Aron Gombas _Midori_
Community Champion
December 5, 2023

Although you can add conditions to pipeline steps, those aren't very powerful as you can only test for which files were included in the change.

What you could do is, that basically your steps are UNIX commands, and in the shell you can test for existence of a environment variable in a dead-simple way.

Suggest an answer

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

Atlassian Community Events