1. 程式人生 > 其它 >Jenkins部署CI&CD(基於Windows平臺)

Jenkins部署CI&CD(基於Windows平臺)

目錄

Jenkins

Jenkins Official Document: https://www.jenkins.io/doc/pipeline/tour/getting-started/

Setup flow

  1. 下載安裝Java11: https://www.oracle.com/java/technologies/downloads/
  2. 下載安裝Jenkins: https://www.jenkins.io/download/thank-you-downloading-windows-installer-stable/
  3. Implement Flow: https://www.cnblogs.com/sunzzc/p/13526893.html
  4. Jenkins開啟選擇安裝預設plugins

FAQ

SSH issues

Q. Upgrade default SSH or Bad configuration option: pubkeyacceptedalgorithms

Solution: Download Openssh: https://github.com/PowerShell/Win32-OpenSSH/releases

#install OpenSSH
powershell.exe -ExecutionPolicy Bypass -File install-sshd.ps1
sc config sshd start= auto
net start sshd
ssh -V

Q. SSH in Jenkins: Transfer 0 files due to WORKSPACE is not correct

Solution: correct the setting in 'manage Jenkins -> configure' or 'configure system'https://www.cnblogs.com/itech/p/5192162.html

Port 8080被佔用 CMD命令解決

netstat -ano | findstr "8080"
tasklist | findstr "xxx"
#開啟 taskmanager -> Details -> Endtask

Plugin Issue: Source Code Management-None 沒有Git選項

Solution: https://blog.csdn.net/shark1357/article/details/89324684

實際效果

安裝Blue Ocean 外掛後的效果

結合Apache通過SSH釋出效果如下