Skip to content

Looking for a way to run a workflow on all self-hosted agents in a pool #27074

Discussion options

You must be logged in to vote

Do not try to use workflows for maintenance of the runners machines (“agents”). Beyond groups you can’t control where a job ends up, and jobs aren’t meant to change the agents themselves.

There are two options I can recommend:

  • Set up cron jobs on the agents. Cron lets you define commands to run at certain times. This way each of your agents cleans up on its own, no external instruction needed. I think that’s the best tool for your regular cleanup.

  • Use a remote management tool, e.g. Ansible. Simply put, you can configure which hosts to manage, and then tell Ansible what to do with all of them. It’s probably a bit overcomplex for your task, but if you want to maintain the agents automat…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants