ubuntu jenkins installation and deployment

Jenkins automated deployment has been used for a long time, but has never been deployed by itself

I have configured it in the past two days, just make a record

wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
sudo apt-get install jenkins

 Download and install jenkins first

start jenkins

sudo systemctl start jenkins

 Jenkins default port is 8080

Then you can enter. Start by logging in and registering, then install some plugins, and that’s it.

 

Now we need to install a few more important plugins

maven git jdk   



 

We already have git and jdk installed by default before.  

So just install maven and it's ok

 

Then start configuring system settings

Install git, maven, jdk The installation path here is the installation path of your server



 

 

 In the case of git, it is said on the Internet that the path should go to the execution directory, but in fact this is already the execution directory.

 

Then you can start configuring the project

 



 When you enter the git path at the beginning of this block, an error will be reported because ssh is not configured

Clicking on the add

 block requires you to copy the private key of the ssh configured by the server, which is the one in the rsa file, and then just name it.

Then the error is resolved

Then step by step

 

 this is also bothering me for a long time root pom This must be the path of your project pom

 



 Then because I deployed jetty, I added the above. If it is deployed by tomcat, it needs to be reset.



 Click on the project to build now and it's successful

 

 

Main reference articles

http://www.linuxidc.com/Linux/2016-12/138290.htm

http://www.linuxdiyf.com/linux/21547.html

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326069352&siteId=291194637
Recommended