Skip to content

Monitor GitHub Runner Process on Windows 10 #73

Open
@marlon-git

Description

@marlon-git

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions