Jenkins builds Nodejs automated testing

1. Install Jenkins (Windows)

1. Download the installation package from the Jenkins official website ( https://jenkins.io/ ), unzip and install it

2. After the installation is complete, a page will be opened automatically, find the random password in the installation directory according to the prompt, and configure the administrator

3. Jenkins needs to install various plug-ins, the first installation can be directly recommended

Second, configure the project

1. Create a project

After entering the project name, select the free-style software project

2. Configure source code management

Select the Git method, enter the repository address (Repository URL), configure the Git username/password (Credentials), the branch generally defaults to master, and can be configured as needed

PS: If you enter the Repository URL and add the username and password, if the following prompt appears, Jenkins may not be able to find Git.exe

Solution: You can go to "System Management - Global Tool Configuration" to modify, find the path where Git is located and modify it

3. Build the trigger

The cycle is used here to build, and it must be built once a day at 9 o'clock

4. Build environment

5. Build

The project uses the Egg framework, because it is a windows environment, select Execute Windows batch command

PS: I first tried to write two sentences in one Execute, but the result was that only the first sentence was executed, but when I wrote a batch file, this would not happen, so I added two builds

6. Post-build operations

Only email reminders are sent here, and other projects can also be packaged and built.

 

Guess you like

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