preface

  • Front-end automation is the automated process of building, packaging, testing, and deploying front-end code

  • Front-end automation is often combined with the continuous integration CI/ Continuous deployment CD process

  • The significance of automated processes lies in:

    • Reduce human error and improve software quality
    • Efficient iteration, convenient deployment
    • Fast delivery, easy to manage

Jenkins continuous integration tool

  • Use Jenkins continuous integration tool to automate front-end deployment
  • Jenkins is an open source, user-friendly continuous integration (CI) tool that originated in Hudson (commercially available) and is used to continuously and automatically build/test software projects and monitor the running of external tasks
  • Jenkins is written in the Java language and can run in popular servlet containers such as Tomcat or on its own. It is often used in combination with version management tools (SCM) and build tools
  • Commonly used version control tools are SVN, GIT, build tools are Maven, Ant, Gradle

Install Jenkins continuous integration tools

Prerequisites The Java environment has been configured

1. Download the installation program

www.jenkins.io/zh/download…

2. Complete the installation as prompted

After the installation, visit http://localhost:8080

3. Install the plug-in

Go to the Plug-in management page from system Settings.

    1. Publish Over SSH
    1. Gitee plug-in

4. Set system Settings

Configure Publish over SSH. On Publish over SSH, click Add SSH Server, select Advanced Settings, and set the IP address, user name, and password

Create a task

1. Click New, enter a name, and select a free style project

2. Configure source code

Select Git and fill in the Gitee project clone address, username, key, and branch

3. Select build triggers

4. Select the build environment

5. Configure the build

Write the script action to execute in the shell

6. The basic configuration has been implemented. Click Apply
7. Click Build Now to automatically execute shell scripts

summary

Above is a brief introduction of how Jenkins realizes automated deployment. In short, the application of Jenkins automated deployment in practical work greatly improves the research and development efficiency.

The resources

# Jenkins setup and setup