Tuesday, December 14, 2021

commands to add a windows node to jenkins

 

Install chocolatey on Windows
Link --> https://docs.chocolatey.org/en-us/choco/setup
 1. Open powershell as administrator
 2. Set-ExecutionPolicy Bypass -Scope Process -Force;
[System.Net.ServicePointManager]::SecurityProtocol =
[System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((NewObject
System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'
))
Install Java8 using chocolatey
 1. In powershell run the following command
 2. choco install jdk8
Download agent.jar (Run these commands in powershell)
 $WebClient = New-Object System.Net.WebClient
 Makesure you have your jenkins IP in the following URL

$WebClient.DownloadFile("http://3.90.104.179:8080/jnlpJars/agent.jar","ag
ent.jar")
java -jar agent.jar -jnlpUrl http://172.31.29.166:8080/computer/windowsslave/slave-agent.jnlp -secret
539d4411b6b8cc92d23037419966556a1f36ff442590581abf51311dcf096807 -workDir
"C:\jenkins" 

No comments:

Post a Comment