windows

create an agent in Jenkins

config

install

install as a service

start service

[!DANGER] for v2.0arrow-up-right

removed:

open the node connection page -> Launch -> File -> Install as a server

start server manually

setup jenkins-slave.exe

run as administrator

install and start service by cmd -> sc.exe

[!NOTE]

sc

[!TIP]

  • service configuration

  • list all services

  • setup servicerestart when anything abnormal

remove service

remove service

[!TIP] or remove HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\jenkins

prepare

download agent.jar

download winws.exe and rename

circle-info

create xml

[!TIP] tips on xml label

  • <onfailure action="restart" />:

    onfailure action="restart"
  • <download from="https://jenkins.sample.com/jnlpJars/agent.jar" to="%BASE%\agent.jar"/>:

    2022-11-30 06:31:38,022 INFO - Downloading: https://jenkins.sample.com/jnlpJars/agent.jar to J:\jenkins\agent.jar. failOnError=False

install and start agent service

circle-info

[!TIP]

  • check available cli commands

winsw folder structure

stop services

tools

[!TIP] if Environment Variable changed in jenkins agent, the service requires to reboot again.

curl

[!NOTE|label:references:]

  • via scoop

  • via chocolatey

  • via manually

    RETURN
    ARCHITECTURE
    SYSTEM TYPE
    DOWNLOAD

    9

    x64 (AMD64)

    x64-based PC

    64-bit

    5

    ARM

    ARM64-based PC

    ARM64

    0

    x86

    x86-based PC

    32-bit

Q&A

a windows service must first be installed ( using installutil.exe )

windows server start error

[!TIP]

Last updated

Was this helpful?