1、Hudson配置说明Hudson配置项说明DescriptionThis description is placed on the project top page so that visitors can know what this job is about. You can use any HTML tags here. Discard Old Builds This controls the disk consumption of Hudson by managing how long youd like to keep records of the builds (such as c
2、onsole output, build artifacts, and so on.) Hudson offers two criteria: Driven by age. You can have Hudson delete a record if it reaches a certain age (for example, 7 days old.) Driven by number. You can have Hudson make sure that it only maintains up to N build records. If a new build is started, t
3、he oldest record will be simply removed. Hudson also allows you to mark an individual build as Keep this log forever, to exclude certain important builds from being discarded automatically. This build is parameterized When you are using Hudson for various automations, its sometimes convenient to be
4、able to parameterize a build, by requiring a set of user inputs to be made available to the build process. For example, you might be setting up an on-demand test job, where the user can submit a zip file of the binaries to be tested. This section configures what parameters your build takes. Paramete
5、rs are distinguished by their names, and so you can have multiple parameters provided that they have different names. See the Wiki topic for more discussions about this feature. String Parameter Defines a simple text parameter, where users can enter a string value, which you can use during a build,
6、either as an environment variable, or through variable substitution in some other parts of the configuration. Note that when this field is exposed as an environment variable, it will be always in the upper case (e.g., the parameter foo would be exposed as FOO). In Ant for example you access it by ty
7、ping in $env.FOO Default Value Specifies the default value of the field, which allows the user to save typing the actual value. File ParameterAccepts a file submission from a browser as a build parameter. The uploaded file will be placed at the specified location in the workspace, which your build c
8、an then access and use. This is useful for many situations, such as: 1. Letting people run tests on the artifacts they built. 2. Automating the upload/release/deployment process by allowing the user to place the file. 3. Perform data processing by uploading a dataset. File location Specifies the loc
9、ation, relative in the workspace, where the uploaded file will be placed (for example, like jaxb-ri/data.zip) Disable Build (No new builds will be executed until the project is re-enabled.) Sometimes, youd want to temporarily stop building a project. For example, maybe you are in the middle of a lar
10、ge migration and you know new builds are going to fail. Or maybe a project is built every hour but you know that the CVS server will be down for the next 24 hours. When this option is set, no new build is performed on this project. This allows you to disable new builds without changing any of the bu
11、ild dependency chain or changing the notification set up. Tie this project to a node Sometimes a project can only be successfully built on a particular slave (or master). If so, this option forces Hudson to always build this project on a specific computer. Otherwise, uncheck the box so that Hudson c
12、an schedule builds on available nodes, which results in faster turn-around time. This option is also useful when youd like to make sure that a project can be built on a particular nodeAdvanced Project Options Quiet period If set, a newly scheduled build waits for this many seconds before actually be
13、ing built. This is useful for: Collapsing multiple CVS change notification e-mails into one (some CVS changelog e-mail generation scripts generate multiple e-mails in quick succession when a commit spans across directories). If your coding style is such that you commit one logical change in a few cv
14、s/svn operations, then setting a longer quiet period would prevent Hudson from building it prematurely过早地 and reporting a failure. Throttling分流 builds. If your Hudson installation is too busy with too many builds, setting a longer quiet period can reduce the number of builds. If not explicitly set a
15、t project-level, the system-wide default value is used. Use custom workspace For each job on Hudson, Hudson allocates a unique workspace directory. This is the directory where the code is checked out and builds happen. Normally you should let Hudson allocate and clean up workspace directories, but i
16、n several situations this is problematic, and in such case, this option lets you specify the workspace location manually. Once such situation is where paths are hard-coded and the code needs to be built on a specific location. (and you can find one such discussion here.) While theres no doubt that s
17、uch a build is not ideal, this option allows you to get going in such a situation. Another situation where this is useful is when you are using the free-style project type not to perform a software build, but execution of a certain batch task, perhaps as a cron克隆 replacement. In such case, you can u
18、se this option to map the relevant directory as the workspace, so that people can look at files through the Hudson web UI, and you can kick relevant commands more easily. If you are in a distributed build environment, unless you tie a job to a specific node, Hudson may still move around 走来走去jobs to
19、different slaves. Sometimes this is desirable, sometimes this is not. Also, you can map multiple projects to have the same workspace, but if you do so, make sure concurrent executions of those jobs wont have nasty令人讨厌的 interferance with each other. Source Code ManagementCVSROOT The CVS connection st
20、ring Hudson uses to connect to the server. The format is the same as $CVSROOT environment variable (:protocol:userhost:path) Module(s)The CVS module name(s) in the given CVSROOT to check out. Multiple modules can be specified by separating them by a whitespace. If your module name contains whitespac
21、e, you can escape by writing it as . For example foo bar zot will specify two modules foo bar and zot. Branch This is a tag, not a branch If set, Hudson will run CVS with -r to build a particular branch. If left empty, Hudson will build the trunk. Normally, Hudson runs cvs check-out and update with
22、the -D date option to make sure it gets a coherent snapshot of the repository and better build reproducibility重复能力, but this interferes 妨碍if the branch name specified here is actually a tag name. Telling Hudson that the name is a tag would fix this problem. 高级选项CVS_RSH If set, Hudson will run CVS wi
23、th the CVS_RSH environment variable set to this value. If this value is not set, and the web container that Hudson runs in has CVS_RSH set in its environment variable, then CVS will inherit继承 it. Legacy遗留问题 mode (run CVS in a way compatible with older versions of Hudson 1.21) Hudson 1.20 and earlier
24、 used to create redundant多余的 directories inside the workspace. For example, if the CVS module name is foo/bar, it first created foo/bar and then put everything below. With this option checked off, there will be no more such unnecessary intermediate directories. This affects other path specifiers, su
25、ch as artifact archivers - you now specify build/foo.jar instead of foo/build/foo.jar. Use update If checked, Hudson will use cvs update whenever possible for builds. This makes a build faster. But this also causes the artifacts from the previous build to remain in the file system when a new build s
26、tarts, making it not a true clean build. Build TriggersBuild after other projects are built Set up a trigger so that when some other projects finish building, a new build is scheduled for this project. This is convenient for running an extensive test after a build is complete, for example. This conf
27、iguration is the opposite view of the Build other projects section in the Post-build Actions. Updating one will change the other automatically. Poll SCM Configure Hudson to poll changes in SCM. Note that this is going to be an expensive operation for CVS, as every polling requires Hudson to scan the
28、 entire workspace and verify it with the server. Consider setting up a push trigger to avoid this overhead, as described in this document Build periodically Provides a cron-like feature to periodically execute this project. This feature is primarily for using Hudson as a cron replacement, and it is
29、not ideal for continuously building software projects. When people first start continuous integration, they are often so used to the idea of regularly scheduled builds like nightly/weekly that they use this feature. However, the point of continuous integration is to start a build as soon as a change
30、 is made, to provide a quick feedback to the change. To do that you need to hook up SCM change notification to Hudson. So, before using this feature, stop and ask yourself if this is really what you want. BuildExecute shellRuns a shell script (defaults to sh, but this is configurable) for building t
31、he project. The script will be run with the workspace as the current directory. Type in the contents of your shell script. If your shell script has no header line like #!/bin/sh , then the shell configured system-wide will be used, but you can also use the header line to write script in another lang
32、uage (like #!/bin/perl) or control the options that shell uses. By default, the shell will be invoked with the -ex option. So all of the commands are printed before being executed, and the build is considered a failure if any of the commands exits with a non-zero exit code. Again, add the #!/bin/. line to change this behavior. As a best practice, try not to put a long shell script in here. Instead, consider ad
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1