I have a pipeline with 6 tasks in one job, this job runs on agent01(self-hosted), there are two users, user1 and user2(more privileges) on agent01.
My requirement is, my pipeline job running on agent01 must use user1 for task 1,2,3 and use2 for task 4,5,6. How to achieve this ? please suggest.