tektoncd / pipeline

A cloud-native Pipeline resource.
https://tekton.dev
Apache License 2.0
8.41k stars 1.77k forks source link

WORKAROUND: implementing runafter for finally task on tekton-pipelines #6919

Open gabo89 opened 1 year ago

gabo89 commented 1 year ago

Feature request

workaround that allow to implement finally task on tekton-pipelines

Use case

in case we want to implement the step separately on in its own task on finally task after the pipeline run we can leverage this workaround instead of putting all the step sequence in a unique finally task

image following this idea we may enable sequence on finally task by leveraging loop in the task that wait for a existing file in a shared workspace that allow to continue running the pipeline

if this logic is planned to be adopted by tekton-pipelines this logic can be wrapped around runafter tag so it can be used like the normal runafter command for normal task , furthermore we can also add a additional empty dir that is created on pipeline run and is attached to all finally task pod so we don't need to attach any workspace to be able to have this features, thanks to those dir the finally task can share their status via file to other finally task , the file name canalso be same to the task name.

tekton-robot commented 10 months ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale with a justification. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

tekton-robot commented 9 months ago

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten with a justification. Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle rotten

Send feedback to tektoncd/plumbing.