Jenkins integrates Maven and Git

1. Jenkins integrates Maven

 

   1. Jenkins integrates the Maven integration plugin by default;



 

 

   2. System Management -> System Settings -> Global Tool Configuration

Configure the Maven installation directory and the configuration file directory settings.xml



 

 

 

   3. My Views -> specific build tasks -> configuration -> build

Added build steps (Maven version, Goals, POM)



 

 

2. Jenkins integrates Git

 

   1. Jenkins integrates the Git Plugin by default;

 

   2. Use Git to manage source code in build tasks

My Views -> specific build tasks -> configuration -> Git (Repository URL, Credentials, Branch)



 

 

   3.Git Credentials configuration

   Here we use public key to configure Git authentication.

   ssh-keygen -t rsa -C [email protected] Generate public key information

   Add the public key information we generated to Git;

   Add Credentials: Fill in username, public key information



 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326813815&siteId=291194637