问题描述
我已经在这个项目上工作了大约一个星期,而且我已经搜索了2天,但没有任何明确的在线解释.对于学校作业,我们需要使用以下程序设置构建服务器:
I've been working on this project for about a week now and I've been searching for 2 days without any clear explanation online.For a school assignment, we need to set up a buildserver with the following programs:
- Maven,作为我们的构建工具.
- Mercurial作为我们的版本控制系统.
- Java(JRE),javac和javadoc.
- 用于单元测试的JUnit.
- Jenkins(带有JDepend插件).
我们需要创建3个工作,其中1个工作是:
We need to create 3 jobs, and 1 of those jobs is:
我们需要使用的工具是: Javac , Maven 作为我们的构建工具,当然还有 Mercurial .
The tools that we need to use are: Javac, Maven as our build tool, and Mercurial of course.
这一切都发生在Ubuntu环境中.由于我完全不熟悉Linux,因此不知道如何执行此操作.
This happens all in an Ubuntu environment. Since I am not familiar (at all) with Linux, I have no clue how to do this.
我不是在寻求现成的解决方案,而是在寻求一些技巧"来理解诸如Mercurial "Hooks" 之类的东西,这是我需要(要做)的事情这项工作是在詹金斯(Jenkins)等人工作的.我在网上找到的所有内容都比较模糊,并在python中使用示例.
I'm not asking for a ready-made solution, but I am rather asking for some 'tips' to understand things like Mercurial 'Hooks', what I need (to do) to get this job working in Jenkins, etc. Everything I find online is rather vague and uses examples with python.
如此具体:欢迎您提供一些指导:)感谢您的帮助!
So concrete: A little guidance might be welcome :) Every helping hand is appreciated!
推荐答案
听起来您的教授希望詹金斯(Jenkins)轮询Mercurial存储库以查找更改(每1分钟触发一次").设置Jenkins作业时,名为构建触发器"的部分将具有轮询选项.那就是你想要的.
It sounds like your professor wants Jenkins to poll the Mercurial repository for changes ("triggered every 1 minute"). When you set up your Jenkins job, the section called "Build Triggers" will have a poll option. That's the one you want.
一个更好的解决方案是让Mercurial告诉Jenkins有关更改的信息,因为轮询通常是一个坏主意(即使您连续几天都没有检查任何内容,Jenkins仍然会每隔一分钟询问 已经改变).您可以查看这本书中有关如何编写Mercurial挂钩的示例,也可以使用我编写的Python脚本.
A better solution would be to have Mercurial tell Jenkins about changes, since polling is generally a bad idea (even if you don't check anything in for days, Jenkins still asks every minute if anything has changed). You can look at the book for examples on how to write Mercurial hooks, or you can use the Python script I wrote.
这篇关于詹金斯(Jenkins)在轻率犯下后建立的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!