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
  5. open http://localhost:8080 then you can configure for your project now, cheers!

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发布效果如下

posted @ 2022-04-11 11:57  Simon.Zhou  阅读(100)  评论(0编辑  收藏  举报