Hudson配置说明Word文档下载推荐.docx
- 文档编号:16774443
- 上传时间:2022-11-26
- 格式:DOCX
- 页数:14
- 大小:25.31KB
Hudson配置说明Word文档下载推荐.docx
《Hudson配置说明Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《Hudson配置说明Word文档下载推荐.docx(14页珍藏版)》请在冰豆网上搜索。
,toexcludecertainimportantbuildsfrombeingdiscardedautomatically.
Thisbuildisparameterized
WhenyouareusingHudsonforvariousautomations,it'
ssometimesconvenienttobeableto"
parameterize"
abuild,byrequiringasetofuserinputstobemadeavailabletothebuildprocess.Forexample,youmightbesettingupanon-demandtestjob,wheretheusercansubmitazipfileofthebinariestobetested.
Thissectionconfigureswhatparametersyourbuildtakes.Parametersaredistinguishedbytheirnames,andsoyoucanhavemultipleparametersprovidedthattheyhavedifferentnames.
SeetheWikitopicformorediscussionsaboutthisfeature.
StringParameter
Definesasimpletextparameter,whereuserscanenterastringvalue,whichyoucanuseduringabuild,eitherasanenvironmentvariable,orthroughvariablesubstitutioninsomeotherpartsoftheconfiguration.
Notethatwhenthisfieldisexposedasanenvironmentvariable,itwillbealwaysintheuppercase(e.g.,theparameter"
foo"
wouldbeexposedas"
FOO"
).InAntforexampleyouaccessitbytypingin${env.FOO}
DefaultValue
Specifiesthedefaultvalueofthefield,whichallowstheusertosavetypingtheactualvalue.
FileParameter
Acceptsafilesubmissionfromabrowserasabuildparameter.Theuploadedfilewillbeplacedatthespecifiedlocationintheworkspace,whichyourbuildcanthenaccessanduse.
Thisisusefulformanysituations,suchas:
1.Lettingpeopleruntestsontheartifactstheybuilt.
2.Automatingtheupload/release/deploymentprocessbyallowingtheusertoplacethefile.
3.Performdataprocessingbyuploadingadataset.
Filelocation
Specifiesthelocation,relativeintheworkspace,wheretheuploadedfilewillbeplaced(forexample,like"
jaxb-ri/data.zip"
)
DisableBuild(Nonewbuildswillbeexecuteduntiltheprojectisre-enabled.)
Sometimes,you'
dwanttotemporarilystopbuildingaproject.Forexample,maybeyouareinthemiddleofalargemigrationandyouknownewbuildsaregoingtofail.OrmaybeaprojectisbuilteveryhourbutyouknowthattheCVSserverwillbedownforthenext24hours.
Whenthisoptionisset,nonewbuildisperformedonthisproject.Thisallowsyoutodisablenewbuildswithoutchanginganyofthebuilddependencychainorchangingthenotificationsetup.
Tiethisprojecttoanode
Sometimesaprojectcanonlybesuccessfullybuiltonaparticularslave(ormaster).Ifso,thisoptionforcesHudsontoalwaysbuildthisprojectonaspecificcomputer.Otherwise,unchecktheboxsothatHudsoncanschedulebuildsonavailablenodes,whichresultsinfasterturn-aroundtime.
Thisoptionisalsousefulwhenyou'
dliketomakesurethataprojectcanbebuiltonaparticularnode
AdvancedProjectOptions
Quietperiod
Ifset,anewlyscheduledbuildwaitsforthismanysecondsbeforeactuallybeingbuilt.Thisisusefulfor:
●CollapsingmultipleCVSchangenotificatione-mailsintoone(someCVSchangeloge-mailgenerationscriptsgeneratemultiplee-mailsinquicksuccessionwhenacommitspansacrossdirectories).
●Ifyourcodingstyleissuchthatyoucommitonelogicalchangeinafewcvs/svnoperations,thensettingalongerquietperiodwouldpreventHudsonfrombuildingitprematurely过早地andreportingafailure.
●Throttling分流builds.IfyourHudsoninstallationistoobusywithtoomanybuilds,settingalongerquietperiodcanreducethenumberofbuilds.
Ifnotexplicitlysetatproject-level,thesystem-widedefaultvalueisused.
Usecustomworkspace
ForeachjobonHudson,Hudsonallocatesaunique"
workspacedirectory."
Thisisthedirectorywherethecodeischeckedoutandbuildshappen.NormallyyoushouldletHudsonallocateandcleanupworkspacedirectories,butinseveralsituationsthisisproblematic,andinsuchcase,thisoptionletsyouspecifytheworkspacelocationmanually.
Oncesuchsituationiswherepathsarehard-codedandthecodeneedstobebuiltonaspecificlocation.(andyoucanfindonesuchdiscussionhere.)Whilethere'
snodoubtthatsuchabuildisnotideal,thisoptionallowsyoutogetgoinginsuchasituation.
Anothersituationwherethisisusefuliswhenyouareusingthefree-styleprojecttypenottoperformasoftwarebuild,butexecutionofacertainbatchtask,perhapsasacron克隆replacement.Insuchcase,youcanusethisoptiontomaptherelevantdirectoryastheworkspace,sothatpeoplecanlookatfilesthroughtheHudsonwebUI,andyoucankickrelevantcommandsmoreeasily.
Ifyouareinadistributedbuildenvironment,unlessyoutieajobtoaspecificnode,Hudsonmaystillmovearound走来走去jobstodifferentslaves.Sometimesthisisdesirable,sometimesthisisnot.Also,youcanmapmultipleprojectstohavethesameworkspace,butifyoudoso,makesureconcurrentexecutionsofthosejobswon'
thavenasty令人讨厌的interferancewitheachother.
SourceCodeManagement
CVSROOT
TheCVSconnectionstringHudsonusestoconnecttotheserver.Theformatisthesameas$CVSROOTenvironmentvariable(:
protocol:
user@host:
path)
Module(s)
TheCVSmodulename(s)inthegivenCVSROOTtocheckout.Multiplemodulescanbespecifiedbyseparatingthembyawhitespace.Ifyourmodulenamecontainswhitespace,youcanescapebywritingitas'
\'
.Forexample"
foo\barzot"
willspecifytwomodules"
foobar"
and"
zot"
.
Branch
Thisisatag,notabranch
Ifset,HudsonwillrunCVSwith-rtobuildaparticularbranch.Ifleftempty,Hudsonwillbuildthetrunk.
Normally,Hudsonrunscvscheck-outandupdatewiththe-Ddateoptiontomakesureitgetsacoherentsnapshotoftherepositoryandbetterbuildreproducibility重复能力,butthisinterferes妨碍ifthebranchnamespecifiedhereisactuallyatagname.TellingHudsonthatthenameisatagwouldfixthisproblem.
高级选项
CVS_RSH
Ifset,HudsonwillrunCVSwiththeCVS_RSHenvironmentvariablesettothisvalue.Ifthisvalueisnotset,andthewebcontainerthatHudsonrunsinhasCVS_RSHsetinitsenvironmentvariable,thenCVSwillinherit继承it.
Legacy遗留问题mode(runCVSinawaycompatiblewitholderversionsofHudson<
1.21)
Hudson1.20andearlierusedtocreateredundant多余的directoriesinsidetheworkspace.Forexample,iftheCVSmodulenameis"
foo/bar"
itfirstcreated"
andthenputeverythingbelow.Withthisoptioncheckedoff,therewillbenomoresuchunnecessaryintermediatedirectories.
Thisaffectsotherpathspecifiers,suchasartifactarchivers---younowspecify"
build/foo.jar"
insteadof"
foo/build/foo.jar"
Useupdate
Ifchecked,Hudsonwilluse'
cvsupdate'
wheneverpossibleforbuilds.Thismakesabuildfaster.Butthisalsocausestheartifactsfromthepreviousbuildtoremaininthefilesystemwhenanewbuildstarts,makingitnotatruecleanbuild.
BuildTriggers
Buildafterotherprojectsarebuilt
Setupatriggersothatwhensomeotherprojectsfinishbuilding,anewbuildisscheduledforthisproject.Thisisconvenientforrunninganextensivetestafterabuildiscomplete,forexample.
Thisconfigurationistheoppositeviewofthe"
Buildotherprojects"
sectioninthe"
Post-buildActions"
.Updatingonewillchangetheotherautomatically.
PollSCM
ConfigureHudsontopollchangesinSCM.
NotethatthisisgoingtobeanexpensiveoperationforCVS,aseverypollingrequiresHudsontoscantheentireworkspaceandverifyitwiththeserver.Considersettingupa"
push"
triggertoavoidthisoverhead,asdescribedinthisdocument
Buildperiodically
Providesacron-likefeaturetoperiodicallyexecutethisproject.
ThisfeatureisprimarilyforusingHudsonasacronreplacement,anditisnotidealforcontinuouslybuildingsoftwareprojects.Whenpeoplefirststartcontinuousintegration,theyareoftensousedtotheideaofregularlyscheduledbuildslikenightly/weeklythattheyusethisfeature.However,thepointofcontinuousintegrationistostartabuildassoonasachangeismade,toprovideaquickfeedbacktothechange.TodothatyouneedtohookupSCMchangenotificationtoHudson..
So,beforeusingthisfeature,stopandaskyourselfifthisisreallywhatyouwant.
Build
Executeshell
Runsashellscript(defaultstosh,butthisisconfigurable)forbuildingtheproject.Thescriptwillberunwiththeworkspaceasthecurrentdirectory.Typeinthecontentsofyourshellscript.Ifyourshellscripthasnoheaderlinelike#!
/bin/sh—,thentheshellconfiguredsystem-widewillbeused,butyoucanalsousetheheaderlinetowritescriptinanotherlanguage(like#!
/bin/perl)orcontroltheoptionsthatshelluses.
Bydefault,theshellwillbeinvokedwiththe"
-ex"
option.Soallofthecommandsareprintedbeforebeingexecuted,andthebuildisconsideredafailureifanyofthecommandsexitswithanon-zeroexitcode.Again,addthe#!
/bin/...linetochangethisbehavior.
Asabestpractice,trynottoputalongshellscriptinhere.Instead,considerad
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Hudson 配置 说明