Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monitor GitHub Runner Process on Windows 10 #73

Open
marlon-git opened this issue Feb 27, 2023 · 1 comment
Open

Monitor GitHub Runner Process on Windows 10 #73

marlon-git opened this issue Feb 27, 2023 · 1 comment

Comments

@marlon-git
Copy link

marlon-git commented Feb 27, 2023

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:

$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.
@alvagante
Copy link
Member

Currently the tp command line is not supported on Windows, and the command itself is used buy the relevant tp::test task. Sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants