The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

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.

DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events