cloudscode / ToDo

0 stars 0 forks source link

jenkins #31

Open cloudscode opened 7 years ago

cloudscode commented 7 years ago

查看安装目录信息

ps -ef | grep jenkins

cloudscode commented 7 years ago

remove jenkins

sudo service jenkins stop

For centos it will be
sudo yum remove jenkins

For ubuntu it will
sudo apt-get remove --purge jenkins
cloudscode commented 7 years ago

install jenkins

sudo rpm -ih jenkins-2.32.2-1.1.noarch.rpm

start jenkins

sudo service jenkins start
cloudscode commented 7 years ago

scp拷贝文件

scp /var/lib/jenkins/workspace/Pft-Framework/target/Pft-Framework-0.0.1.jar root@192.168.20.250:/var/javaweb/

scp ~/.ssh/authorized_keys root@192.168.20.250

Jenkins SSH

  1. sudo su -s /bin/bash jenkins
  2. ssh-keygen
  3. cat /var/lib/jenkins/.ssh/id_rsa.pub
ssh@yourrepository
vi .ssh/authorized_keys
http://stackoverflow.com/questions/15174194/jenkins-host-key-verification-failed

Jenkins插件

Publish Over SSH插件

这个插件可以通过ssh连接其他Linux机器

http://www.cnblogs.com/zz0412/p/jenkins_jj_10.html

jenkins构建并远程发布后执行shell脚本

http://blog.csdn.net/u012599988/article/details/44041339
cloudscode commented 7 years ago

ubuntu install jenkins

cloudscode commented 7 years ago

inster jenkins

update jenkins

cloudscode commented 7 years ago

Blue Ocean

Getting Started with Blue Ocean

cloudscode commented 7 years ago

delete credentials

Home page -> Credentials

cloudscode commented 7 years ago

Webhook

Gogs+Webhook+Plugin Gogs-Webhook Plugin

In Gogs configure your webhook like this:

http(s)://<< jenkins-server >>/gogs-webhook/?job=<< jobname >>
cloudscode commented 7 years ago

Jenkins Doc

Jenkins Doc

jenkins2 pipeline

jenkins2 pipeline 语法快速参考