Jenkins deployment

Happy to run with, to listen carefully, thinking to use development, with efforts to struggle, with the objective to measure, with love to life.


https://blog.csdn.net/qq_34618853/article/details/70170348 describes the installation of five ways



View System Environment

cat /etc/os-release

Ensure that the system date

apt update
apt list --upgradable      //查看

Jdk installation environment

apt install openjdk-8-jdk

Verify the installation of the Java environment:

# java -version
openjdk version "1.8.0_121"

Installation Jenkins

Add Jenkins Source: 
wget -q -O - http://pkg.jenkins-ci.org/debian-stable/jenkins-ci.org.key | sudo APT-Key the Add - 
Create a list of sources for the Jenkins: 
SH -c ' echo deb http://pkg.jenkins-ci.org/debian-stable binary /> /etc/apt/sources.list.d/jenkins.list ' 
updated again and begin the installation process Jenkins: 
APT update 
APT the install Jenkins

Uninstall Jenkins

apt-get --purge remove jenkins
apt-get --purge remove
apt autoremove


operating

Log in reference documentation system installed plug-ins built task inside ssh js two systems to be upgraded node

The whole idea is: git from the code to the pull server Jenkins (with a code holding pulling on the machine), by constructing nodejs, dynamic SSH server to the specified directory (can be seen as an incremental backup, this case does not contain the directory * .git files), and then through the script, the successful implementation




When built several key operations

Write a build.xml global configuration inside plus ssh server public key exchange

Otherwise, no reason being given ahead of the best in the workspace git clone it in the project code



upgrade

Stop Service

/usr/share/jenkins/jenkins.war war update package

Backup original package to download new https://mirrors.tuna.tsinghua.edu.cn/jenkins/war-stable-rc/latest/jenkins.war

From service


Guess you like

Origin blog.51cto.com/14124898/2401405