Details
-
Suggestion
-
Resolution: Unresolved
-
None
-
None
-
0
-
Description
Problem Statement
Currently Bamboo does not provide an option to define task at Deployment project level and if the content of the task is same this task can be directly used across various deployment environments without defining them individually for each environment.
This would save time and avoid duplication of code, for example let's say we have a script task which is used for deployment and the content of this task is similar for all the environments for this particular deployment project, currently we need to write the content of the script for each environment individually.
Problem Statement
Provide an option on deployment project level where a task can be defined and can be linked to any deployment environment under it without defining it each time.
Workaround
Note : The workaround may not meet your use case, but are possible options available currently
- Store the script from the script task as a variable in Bamboo.
- Using a script task and storing the script in a file and calling that file in each script task.
- Using Specs code to create the Deployment project.
One of the options you can explore is to maintain the deployment project via Specs where you can maintain these tasks in a separate file and call them via !include tag for each environment. You can refer Bamboo YAML specs unable to parse the "!include" tag at stage level which explain how to use the !include tag in Bamboo specs.