task_definitions.rb file has access to helper methods. These helper methods provide useful contextual information about the project.
For example, one of the helper methods provides the exposed port in the Dockerfile of the project. This is useful if someone changes the exported port in the Dockerfile, he will likely forget also to update the ufo variable. You can reference the port via the helper to prevent this from happening. Here is a list of the helpers:
|full_image_name||The full docker image name that ufo builds. The “base” portion of the docker image name is defined in
|dockerfile_port||Exposed port extracted from the Dockerfile of the project.|
|env_vars(text)||This method takes a block of text that contains the env values in
|env_file(path)||This method takes a
|task_definition_name||The name of the task_definition. So if the code looks like this
To call the helper in task_definitions.rb you must add
helper. in front. So
full_image_name is called via
Pro tip: Use the <- and -> arrow keys to move back and forward.