Unanswered
Hi Everyone! Is There A Way I Can Get Task.Get_Task() To Work Without Using Task_Id When Running Tasks As A Pipeline ? Im Trying To Access Old Pipeline Runs/Artifacts On My Current Pipeline But
Oh I see, try the following to get a list of all pipelines, then with the selected pipeline you can locate the component:
pipeline_project = Task.current_task().project
pipelines_ids = Task.query_tasks(task_filter=dict(
project=[pipeline_project],
type=["controller"],
system_tags=["pipeline"],
order_by=["-last_change"],
search_hidden=True,)
)
# take the second to the last updated one (becuase the last one is us)
pipeline_id = pipelines_ids[1]
# get all components, or select the one that is you based on name?
components_ids = Task.query_tasks(task_filter=dict(
project=[pipeline_project], parent=pipeline_id)
)
#
I might have some typos here., but it should generally work
139 Views
0
Answers
one year ago
one year ago