What do you think is good to use as output for tas...
# caching
t
What do you think is good to use as output for tasks “that creates or deploys infrastructure” on some platform? For example, I have a gradle task that deploys an AWS cloudformation stack. Currently we didn’t define an output since it is possible that the cloudformation stack is deleted via management console so rerunning the task should re-deploy again and rely on cloudformation to figure out what’s missing. Or should we have a gradle task that deletes the stack and the cache? 🤔
1
v
Up to you. But if the task should always be executed, I would declare it as
@UntrackedTask
(or
doNotTrackState()
in the runtime API), then the task is always executed. Defining the inputs still makes sense, as they might carry implicit task dependencies as necessary. Defining outputs basically just makes sense if you have additional output like writing something to a file, especially when you want to use that as input for another task.
👍 1
t
thanks a lot for the very fast response! 🙂
👌 1