Use Jenkins to automate the deployment of front-end projects

Jenkins automatically deploys front-end projects

*When I used to write a project, every time the release situation was the package and deployment of the front-end project, I manually ran the command, packaged it, and then uploaded it to the server. This method is indeed a bit low, and the efficiency is still very low.

*Since using the Jenkins continuous integration tool, writing front-end projects has become more and more engineering, and you no longer have to worry about forgetting to deploy projects, and you don’t have to worry about deploying multiple servers and environments after each packaging and compression. What’s more happier is that every time at home After writing the code, there is no need to deploy the project in a remote company, and it will be automatically deployed for you after submitting the code.

*Jenkins is an open source software project. It is a continuous integration tool developed based on Java to monitor continuous repetitive work. It aims to provide an open and easy-to-use software platform to make continuous software integration possible.

JenKins Advantage

*Open source free
* Supported by a large number of plugins.
*With cross-platform function, support all platforms
*master/slave supports distributed build
*For each code commit change, an auto-generated report notification is generated.
* Enables continuous integration of agile development and test-driven development.
* With simple steps, you can automatically complete the maven release project.
*In this case, China uses Jenkins to deploy front-end projects, and uses docker to install *Jenkins, this process needs to be installed by yourself
*Search jenkins directly in the Docker repository

Here is the Chinese customized version
When we are done installing, run the command

You can access the IP + port in the browser
Configure Jenkins
When we access and run in the browser, we can see the current custom page of Jenkins, where we choose to install the recommended plugin for installation

When you click to install the recommended plugin, you can see the page for beginners. Wait until the plugin is installed

At this time, we log in to our Jenkins. If you don't have an account, you need to register first.

After we register and log in, we can see the JenKins ready page, and then we click to start using

At this time, we can see the current Jenkins home page. On the left, we can see the menu bars such as New Item, User List, Build History, etc.

Click New Item, you can create a project, enter the task name, select the pipeline, and then click OK

On the project configuration page, perform some source configuration management, build triggers, build environment, build and other operation configurations.

The git repository address can choose to use github or code cloud as the repository
After all configuration items are configured, they can be packaged through Build with Parameters

Project packaging and uploading through JenKins, integration, each time you finish writing a project, you only need to upload the project to the warehouse, then create a related project in JenKins, and select the corresponding version for packaging, which is convenient and fast.

Related Articles

Explore More Special Offers

  1. Short Message Service(SMS) & Mail Service

    50,000 email package starts as low as USD 1.99, 120 short messages start at only USD 1.00

phone Contact Us