Is there any way to configure Jenkins to mark Windows slave offline when a user starts using slave?
EDIT: By starts using I mean user logs on.
Jenkins monitors each attached node for disk space, free temp space, free swap, clock time/sync and response time. A node is taken offline if any of these values go outside the configured threshold.
Since a Jenkins slave can be registered as a Windows service, one way would be to ensure that there is no currently logged on user.
One could conceive a Windows tasks, running regularely, which would check if a user is logged on, and:
For checking who is logged on, see "From WindowsService how can I find currently logged in user from C#?" for one way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With