Wondering if is possible to use Tiny Puppet to monitor the GitHub Runner process on Windows 10. The process name is Runner.Listener.
Currently using the powershell bellow on a Schedule Task that run every 5 minutes:
$Runner = (Get-Process -Name Runner.Listener -ErrorAction SilentlyContinue -ErrorVariable ProcessError)
if($Runner -eq $null)
{
Write-host "GH Runner is not running" -ForegroundColor Red
.\Cleanup-Runners.ps1
Restart-Computer -ComputerName .
}
else
{
Write-host "GH Runner is running" -ForegroundColor Green
}
Context
The Windows 10 virtual machine is setup on GitHub to be ephemeral what means it will accept only one job then it will be disconnected from GitHub, the Runner.Listener process will die, after that the VM will need to be rebooted. The hypervisor will detect the reboot therefore destroy it and create a fresh one base on a golden image.
If the Runner.Listener is running Tiny Puppet don't need to take any action.
The virtual machines need to run puppet masterless as they will be rebooted and recreated from a golden image from time to time, perhaps trigger it from a schedule task.
Monitor GitHub Runner Process on Windows 10
Wondering if is possible to use Tiny Puppet to monitor the GitHub Runner process on Windows 10. The process name is Runner.Listener.
Currently using the powershell bellow on a Schedule Task that run every 5 minutes:
Context