在Jenkins中配置构建系统

To configure a build system, there needs to be configure JDK, ANT/MAVEN, SCM configuration details, automating build options email notifications and other important things. Below are the steps to be followed in order to configure the same. In the below case we have considered the project to be a Maven Project.

要配置构建系统,需要配置JDK,ANT / MAVEN,SCM配置详细信息,自动构建选项电子邮件通知和其他重要内容。 以下是配置步骤。 在以下情况下,我们认为该项目是Maven项目。

  • Deploy and start the Jenkins server and from the home page, click on New Item.

    部署并启动Jenkins服务器,然后从主页上单击New Item

    Configuring Build System
  • Then click on OK. Now a new page will be displayed where the details of JDK, ANT/Maven, SCM, automating build options, email notifications can be configured.

    然后单击确定。 现在将显示一个新页面,可在其中配置JDK,ANT / Maven,SCM,自动生成选项,电子邮件通知的详细信息。

    Configuring Build System

詹金斯:配置SCM (Jenkins: Configuring SCM)

In order to configure the SCM for the build system, under the "Source Code Management" system, select the required SCM option for your required project and provide the details accordingly.

为了为构建系统配置SCM,请在“源代码管理”系统下,为所需项目选择所需的SCM选项,并提供相应的详细信息。

Configuring SCM

Note : More than one repository URL can be configured in the Jenkins.

注意:在Jenkins中可以配置多个存储库URL。

Jenkins:配置构建触发器 (Jenkins: Configuring Build Triggers)

Jenkins proved multiple options to trigger the builds. Below are the same :

詹金斯证明了多种选择来触发构建。 以下是相同的:

  • Build whenever a SNAPSHOT dependency is built

    每当构建SNAPSHOT依赖项时都进行构建

  • Trigger builds remotely (e.g., from scripts)

    远程触发构建(例如,通过脚本)

  • Build after other projects are built

    在其他项目建成后建造

  • Build periodically (Runs on CRON job)

    定期构建(在CRON作业上运行)

  • Poll SCM (Runs on CRON job)

    轮询SCM(在CRON作业上运行)

User can configure multiple options from the above list. Below screen shot shows how to configure a build based on a CRON job (by selecting the option Build Periodically)

用户可以从上面的列表中配置多个选项。 下面的屏幕截图显示了如何基于CRON作业配置构建(通过选择“定期构建”选项)

Configuring Build Triggers

The above mentioned CRON expression triggers build on 5 AM and 10 PM every day, every month repeatedly!

上面提到的CRON表达式触发器每天每天凌晨5点和晚上10点构建!

詹金斯:配置Maven (Jenkins: Configuring Maven)

For any maven project to be built in Jenkins, the entry point is the pom.xml. The easy way to configure a project's build is to point to the pom.xml of the project as shown below :

对于要在Jenkins中构建的任何Maven项目,入口都是pom.xml。 配置项目构建的简单方法是指向项目的pom.xml,如下所示:

Configuring Maven

Also, there are many other options which can also be configure here as shown above.

另外,还有许多其他选项也可以在此处进行配置,如上所示。

Jenkins:配置Maven构建设置 (Jenkins: Configuring Maven Build Settings)

Jenkins provides the feature to configure the notification service by sending the mails configured for every build runs. It can be configured a shown below :

Jenkins提供了通过发送为每次构建运行配置的邮件来配置通知服务的功能。 可以配置如下所示:

Configuring Maven Build Settings

Jenkins:配置后期构建活动 (Jenkins: Configuring Post build activities)

Jenkins also provides feature to configure activities that needs to be executed post build. Below are the options available :

Jenkins还提供了用于配置需要在构建后执行的活动的功能。 以下是可用的选项:

  • Aggregate downstream test results.

    汇总下游测试结果。

    Configuring Post Build activities


  • Archive the artifacts.

    存档工件。

    Configuring Post Build activities


  • Build other projects.

    建立其他项目。

    Configuring Post Build activities


  • Deploy artifacts to maven repository.

    将工件部署到Maven存储库。

    Configuring Post Build activities


  • Record fingerprints of files to track usage.

    记录文件指纹以跟踪使用情况。

    Configuring Post Build activities

翻译自: https://www.studytonight.com/jenkins/configuring-build-system

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值