Build projects automatically using Jekins (Gitlab+java Maven)

Source: Internet
Author: User

1. Login Jekins

Prerequisite: Jekins has been deployed and can log in
Version: Jenkins2.60.2

Http://IP: Port/jenkins/view/all/newjob

2. Create a new Build task


Select the type of project, select "Build a multi-configuration item" and enter the custom project name, click OK


Code Management Choose Git (need to click Add to add a viable account password)
Note: If you do not involve code operations, such as only shell script execution, you can skip this step

Choose a Build cycle (choose manual build here)

Select "Execute shell script on remote host using SSH" in the build task
Select a site that has been created and enter the shell script that needs to be executed


Once the save is in effect, click "Build Now" to start building. You can see the history of the build below and click inside to see the details.

If you need a shell script that is remote to another environment, you need to install the plugin SSH plugin first:

Jenkins-> plug-in management, install, search ssh Plugin

After installing the reboot you can see that one more option "Execute shell script on remote host using SSH"

Add an SSH remote site
jenkins-> System Management, System configuration->ssh remote hosts


Enter IP, port information, select the user (provided the SSH user has been added)

The save takes effect.

Build projects automatically using Jekins (Gitlab+java Maven)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.