代码改变世界

Launch agent by connecting it to the master

2021-09-27 17:20  jetwill  阅读(28)  评论(0编辑  收藏  举报

Jenkins Node 是 Windows, Jenkins Server 在 Linux

C:\JenkinsAgent\start_jenkins_agent.bat

java -DSoftKillWaitSeconds=0 -Djava.lang.string.substring.nocopy=true -Dhttps.protocols=TLSv1.2 -jar agent.jar -noCertificateCheck -jnlpUrl https://a302-0110-2041.xxx.joyo.com/jenkins/computer/WIN_SIT/slave-agent.jnlp -secret ceb47ec2e996382632baead751f11ac735ff67283053db9007bfed487bf7c903 -workDir "C:\Java\jenkins_agent"

其他方式

https://scmquest.com/jenkins-windows-slave-configuration-with-screenshots/

A Job keeps running on Windows Slave

Root cause: No proper access

https://stackoverflow.com/questions/10952280/execute-windows-batch-command-from-jenkins-fails-but-runs-fine-in-cmd-exe
Solution: Win+R: services.msc --> JenkinsAgent --> Properties --> Log On 
--> This account --> Password and Confirm password --> OK --> Restart the JenkinsAgent Service

Out of memory at "exit 0" in build on Windows with JVM 8

https://issues.jenkins.io/browse/JENKINS-41836
-Djava.lang.string.substring.nocopy=true

Build stuck on final "exit 0"

https://issues.jenkins.io/browse/JENKINS-55106?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel
https://stackoverflow.com/questions/54039226/jenkins-hangs-between-build-and-post-build/54072987#54072987
-DSoftKillWaitSeconds=0