Server dependency
- CentOS 7.6
- Install Tomcat
The installationJenkins
- Enter the
Tomcat
thewebapps
Run the following command in the directory
wget http://mirrors.jenkins.io/war/latest/jenkins.war
Copy the code
- Enter the
Tomcat
thebin
Run the following command to start the Tomcat service
sh startup.sh
Copy the code
- Open a browser and type[Server IP address]:[Tomcat port number]/ JenkinsYou can visit the Jenkins page below
- Enter the password as prompted to see the plug-in installation page
- Directly select the button on the left to install the recommended plug-in. After installation, the user registration page will be displayed
- Once registered, go to Jenkins’ panel
configurationJenkins
- System management -> Management plug-ins -> Optional plug-ins, find the required plug-ins can be installed
- The following plug-ins need to be installed
- NodeJS (since my test project is written in Node, NodeJS is installed)
- Publish Over SSH
- System Administration -> Global Tool Configuration ->NodeJS
- System Management > System Configuration >Github
- System > System Configuration >Publish over SSH
- System Management > Node Management > Create a node
configurationGithub
- Open repository -> Settings -> WebHooks
- Github upper-right Settings->Developer Settings-> Personal Access Tokens ->Generate new Tokens
withJenkins
Creating a Task
Build tasks
- Click the icon to enter the task panel
- Click Build Now to start the Build task
- Click the task number to view the task details
An automated build
Since the Github push has been configured to notify Jenkins of the automatic build task, the update code push to the master branch of the repository will enable the automatic build.