问题描述
我尝试使用Cloudformation使用引导脚本配置ec2实例。 需要使用JNLP和所有必需的软件自动连接Windows从节点。 设置后,我可以下载agent.jar文件,但是该代理无法使用下一个命令进行连接:
java -jar C:\ Users \ Administrator \ Desktop \ agent.jar -jnlpUrl http:// ip_address:8080 / computer / TEST-SLAVE / slave-agent.jnlp -secret my_secret -workdir“ C:\ Jenkins”
但是我可以手动连接该节点。 这里的代码:
- $Path = $env:TEMP;
$Installer = "ChromeStandalonesetup.exe";
Invoke-WebRequest "https://www.slimjet.com/chrome/download-chrome.PHP?file=files%2F84.0.4147.135%2FChromeStandalonesetup.exe" ->
start-process -FilePath $Path\$Installer -Args "/silent /install" -Verb RunAs -Wait;
Remove-Item $Path\$Installer;
Rename-Item "C:\Program Files (x86)\Google\Update\GoogleUpdate.exe" -NewName "GoogleUpdateold.exe";
$Path = $env:TEMP;
$Installer = "zulu8.48.0.53-ca-jdk8.0.265-win_x64.msi";
Invoke-WebRequest "https://cdn.azul.com/zulu/bin/zulu8.48.0.53-ca-jdk8.0.265-win_x64.msi" -OutFile $Path\$Installer;
start-process msiexec.exe -Wait -ArgumentList '/i',$Path\$Installer,'/q' -Verb RunAs;
Remove-Item $Path\$Installer;
$Path = $env:TEMP;
$Installer = "node-v10.15.3-x64.msi";
Invoke-WebRequest "https://nodejs.org/dist/v10.15.3/node-v10.15.3-x64.msi" -OutFile $Path\$Installer;
start-process msiexec.exe -Wait -ArgumentList '/i','/q' -Verb RunAs;
Remove-Item $Path\$Installer;
curl -o C:\Users\Administrator\Desktop\agent.jar http://ip_address:8080/jnlpJars/agent.jar;
java -jar C:\Users\Administrator\Desktop\agent.jar -jnlpUrl http://ip_address:8080/computer/TEST-SLAVE/slave-agent.jnlp -secret my_secret -workdir "C:\Jenkins"
</powershell>
<persist>true</persist>
有什么建议吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)