加入VIP
  • 专属下载特权
  • 现金文档折扣购买
  • VIP免费专区
  • 千万文档免费下载

上传资料

关闭

关闭

关闭

封号提示

内容

首页 Jenkins.The.Definitive.Guide

Jenkins.The.Definitive.Guide.pdf

Jenkins.The.Definitive.Guide

哲刚
2012-12-27 0人阅读 举报 0 0 暂无简介

简介:本文档为《Jenkins.The.Definitive.Guidepdf》,可适用于IT/计算机领域

Jenkins:TheDefinitiveGuideJenkins:TheDefinitiveGuideJohnFergusonSmartBeijing•Cambridge•Farnham•Köln•Sebastopol•TokyoJenkins:TheDefinitiveGuidebyJohnFergusonSmartCopyright©JohnFergusonSmartAllrightsreservedPrintedintheUnitedStatesofAmericaPublishedbyO’ReillyMedia,Inc,GravensteinHighwayNorth,Sebastopol,CAO’Reillybooksmaybepurchasedforeducational,business,orsalespromotionaluseOnlineeditionsarealsoavailableformosttitles(http:mysafaribooksonlinecom)Formoreinformation,contactourcorporateinstitutionalsalesdepartment:()orcorporateoreillycomEditors:MikeLoukidesandMeghanBlanchetteProductionEditor:AdamZarembaProofreader:JenniferKnightIndexer:AngelaHowardCoverDesigner:KarenMontgomeryInteriorDesigner:DavidFutatoIllustrator:RobertRomanoPrintingHistory:July:FirstEditionNutshellHandbook,theNutshellHandbooklogo,andtheO’ReillylogoareregisteredtrademarksofO’ReillyMedia,IncJenkins:TheDefinitiveGuide,theimageofanornatechorusfrog,andrelatedtradedressaretrademarksofO’ReillyMedia,IncManyofthedesignationsusedbymanufacturersandsellerstodistinguishtheirproductsareclaimedastrademarksWherethosedesignationsappearinthisbook,andO’ReillyMedia,Inc,wasawareofatrademarkclaim,thedesignationshavebeenprintedincapsorinitialcapsJenkins:TheDefinitiveGuideisavailableundertheCreativeCommonsAttributionNoncommercialNoDerivativeWorksUnitedStatesLicenseWhileeveryprecautionhasbeentakeninthepreparationofthisbook,thepublisherandauthorassumenoresponsibilityforerrorsoromissions,orfordamagesresultingfromtheuseoftheinformationcontainedhereinISBN:LSITableofContentsForewordxiiiPrefacexvIntroducingJenkinsIntroductionContinuousIntegrationFundamentalsIntroducingJenkins(néeHudson)FromHudsontoJenkinsAShortHistoryShouldIUseJenkinsorHudsonIntroducingContinuousIntegrationintoYourOrganizationPhaseNoBuildServerPhaseNightlyBuildsPhaseNightlyBuildsandBasicAutomatedTestsPhaseEntertheMetricsPhaseGettingMoreSeriousAboutTestingPhaseAutomatedAcceptanceTestsandMoreAutomatedDeploymentPhaseContinuousDeploymentWheretoNowYourFirstStepswithJenkinsIntroductionPreparingYourEnvironmentInstallingJavaInstallingGitSettingUpaGitHubAccountConfiguringSSHKeysForkingtheSampleRepositoryStartingUpJenkinsConfiguringtheToolsvConfiguringYourMavenSetupConfiguringtheJDKNotificationSettingUpGitYourFirstJenkinsBuildJobYourFirstBuildJobinActionMoreReportingDisplayingJavadocsAddingCodeCoverageandOtherMetricsConclusionInstallingJenkinsIntroductionDownloadingandInstallingJenkinsPreparingaBuildServerforJenkinsTheJenkinsHomeDirectoryInstallingJenkinsonDebianorUbuntuInstallingJenkinsonRedhat,Fedora,orCentOSInstallingJenkinsonSUSEorOpenSUSERunningJenkinsasaStandAloneApplicationRunningJenkinsBehindanApacheServerRunningJenkinsonanApplicationServerMemoryConsiderationsInstallingJenkinsasaWindowsServiceWhat’sintheJenkinsHomeDirectoryBackingUpYourJenkinsDataUpgradingYourJenkinsInstallationConclusionConfiguringYourJenkinsServerIntroductionTheConfigurationDashboardTheManageJenkinsScreenConfiguringtheSystemEnvironmentConfiguringGlobalPropertiesConfiguringYourJDKsConfiguringYourBuildToolsMavenAntShellScriptingLanguageConfiguringYourVersionControlToolsConfiguringSubversionConfiguringCVSConfiguringtheMailServerConfiguringaProxyvi|TableofContentsConclusionSettingUpYourBuildJobsIntroductionJenkinsBuildJobsCreatingaFreestyleBuildJobGeneralOptionsAdvancedProjectOptionsConfiguringSourceCodeManagementWorkingwithSubversionWorkingwithGitBuildTriggersTriggeringaBuildJobOnceAnotherBuildJobHasFinishedScheduledBuildJobsPollingtheSCMTriggeringBuildsRemotelyManualBuildJobsBuildStepsMavenBuildStepsAntBuildStepsExecutingaShellorWindowsBatchCommandUsingJenkinsEnvironmentVariablesinYourBuildsRunningGroovyScriptsBuildingProjectsinOtherLanguagesPostBuildActionsReportingonTestResultsArchivingBuildResultsNotificationsBuildingOtherProjectsRunningYourNewBuildJobWorkingwithMavenBuildJobsBuildingWheneveraSNAPSHOTDependencyIsBuiltConfiguringtheMavenBuildPostBuildActionsDeployingtoanEnterpriseRepositoryManagerDeployingtoCommercialEnterpriseRepositoryManagersManagingModulesExtraBuildStepsinYourMavenBuildJobsUsingJenkinswithOtherLanguagesBuildingProjectswithGrailsBuildingProjectswithGradleBuildingProjectswithVisualStudioMSBuildBuildingProjectswithNAntTableofContents|viiBuildingProjectswithRubyandRubyonRailsConclusionAutomatedTestingIntroductionAutomatingYourUnitandIntegrationTestsConfiguringTestReportsinJenkinsDisplayingTestResultsIgnoringTestsCodeCoverageMeasuringCodeCoveragewithCoberturaMeasuringCodeCoveragewithCloverAutomatedAcceptanceTestsAutomatedPerformanceTestswithJMeterHelp!MyTestsAreTooSlow!AddMoreHardwareRunFewerIntegrationFunctionalTestsRunYourTestsinParallelConclusionSecuringJenkinsIntroductionActivatingSecurityinJenkinsSimpleSecurityinJenkinsSecurityRealmsIdentifyingJenkinsUsersUsingJenkins’sBuiltinUserDatabaseUsinganLDAPRepositoryUsingMicrosoftActiveDirectoryUsingUnixUsersandGroupsDelegatingtotheServletContainerUsingAtlassianCrowdIntegratingwithOtherSystemsAuthorizationWhoCanDoWhatMatrixbasedSecurityProjectbasedSecurityRolebasedSecurityAuditingKeepingTrackofUserActionsConclusionNotificationIntroductionEmailNotificationMoreAdvancedEmailNotificationviii|TableofContentsClaimingBuildsRSSFeedsBuildRadiatorsInstantMessagingIMNotificationwithJabberIMNotificationusingIRCIRCNotificationDesktopNotifiersNotificationviaNotifoMobileNotificationSMSNotificationMakingNoiseExtremeFeedbackDevicesConclusionCodeQualityIntroductionCodeQualityinYourBuildProcessPopularJavaandGroovyCodeQualityAnalysisToolsCheckstylePMDCPDFindBugsCodeNarcReportingonCodeQualityIssueswiththeViolationsPluginWorkingwithFreestyleBuildJobsWorkingwithMavenBuildJobsUsingtheCheckstyle,PMD,andFindBugsReportsReportingonCodeComplexityReportingonOpenTasksIntegratingwithSonarConclusionAdvancedBuildsIntroductionParameterizedBuildJobsCreatingaParameterizedBuildJobAdaptingYourBuildstoWorkwithParameterizedBuildScriptsMoreAdvancedParameterTypesBuildingfromaSubversionTagBuildingfromaGitTagStartingaParameterizedBuildJobRemotelyParameterizedBuildJobHistoryParameterizedTriggersTableofContents|ixMulticonfigurationBuildJobsSettingUpaMulticonfigurationBuildConfiguringaSlaveAxisConfiguringaJDKAxisCustomAxisRunningaMulticonfigurationBuildGeneratingYourMavenBuildJobsAutomaticallyConfiguringaJobReusingJobConfigurationwithInheritancePluginSupportFreestyleJobsCoordinatingYourBuildsParallelBuildsinJenkinsDependencyGraphsJoinsLocksandLatchesBuildPipelinesandPromotionsManagingMavenReleaseswiththeMReleasePluginCopyingArtifactsBuildPromotionsAggregatingTestResultsBuildPipelinesConclusionDistributedBuildsIntroductionTheJenkinsDistributedBuildArchitectureMasterSlaveStrategiesinJenkinsTheMasterStartstheSlaveAgentUsingSSHStartingtheSlaveAgentManuallyUsingJavaWebStartInstallingaJenkinsSlaveasaWindowsServiceStartingtheSlaveNodeinHeadlessModeStartingaWindowsSlaveasaRemoteServiceAssociatingaBuildJobwithaSlaveorGroupofSlavesNodeMonitoringCloudComputingUsingAmazonECUsingtheCloudBeesDEVcloudServiceConclusionAutomatedDeploymentandContinuousDeliveryIntroductionImplementingAutomatedandContinuousDeploymentx|TableofContentsTheDeploymentScriptDatabaseUpdatesSmokeTestsRollingBackChangesDeployingtoanApplicationServerDeployingaJavaApplicationDeployingScriptingbasedApplicationsLikeRubyandPHPConclusionMaintainingJenkinsIntroductionMonitoringDiskSpaceUsingtheDiskUsagePluginDiskUsageandtheJenkinsMavenProjectTypeMonitoringtheServerLoadBackingUpYourConfigurationFundamentalsofJenkinsBackupsUsingtheBackupPluginMoreLightweightAutomatedBackupsArchivingBuildJobsMigratingBuildJobsConclusionAppendix:AutomatingYourUnitandIntegrationTestsIndexTableofContents|xiForewordSevenyearsago,IwrotethefirstlineofcodethatstartedthiswholeprojectthatisnowknownasJenkins,andwasoriginallycalledHudsonIusedtobetheguywhobrokethebuild,soIneededaprogramtocatchmymistakesbeforemycolleaguesdidItwasjustasimpletoolthatdidasimplethingButitrapidlyevolved,andnowI’dliketothinkthatit’sthemostdominantCIserveronthemarketbarnone,encompassingabroadpluginecosystem,commercialdistributions,hostedJenkinsasaService,usergroups,meetups,trainings,andsoonAswithmostofmyotherprojects,thisprojectwasopensourcedsinceitsinceptionOveritslifeitcriticallyreliedonthehelpandloveofotherpeople,withoutwhichtheprojectwouldn’tbeinthecurrentstateDuringthistimeI’vealsolearnedathingortwoaboutrunningopensourceprojectsFromthatexperience,Ithinkpeopleoftenoverlookthattherearemanywaystohelpanopensourceproject,ofwhichwritingcodeisjustoneofmanyThere’sspreadingwords,helpingotherusers,organizingmeetups,andyes,there’swritingdocumentationInthissense,JohnisanimportantpartoftheJenkinscommunity,eventhoughhehasn’tcontributedcodeinstead,hemakesJenkinsmoreapproachabletonewusersForexample,hehasapopularblogthat’sfollowedbymany,whereheregularlytalksaboutcontinuousintegrationpracticesandothersoftwaredevelopmenttopicsHeisgoodatexplainingthingssothatpeoplenewtoJenkinscanstillunderstandthem,whichissomethingoftenhardforpeoplelikemewhodevelopJenkinsdayindayoutHeisalsowellknownforhistrainingcourses,ofwhichJenkinsisapartThisisanothermeansbywhichhemakesJenkinsaccessibleformorepeopleHeclearlyhasapassionforevangelizingnewideasandteachingfellowdeveloperstobemoreproductiveThesedaysIspendmytimeatCloudBeeswhereIfocusmytimeonOpenSourceJenkins,theCloudBeesproversionofJenkinswherewebuildpluginsontopofJenkins,andtakingJenkinstotheprivateandpubliccloudwithCloudBeesDEVcloudserviceInthisroleInowhavemoreinteractionwithJohnthanbefore,andmyrespectforhispassionhasonlygrownxiiiSoIwastrulydelightedthathetookonthedauntingtaskofwritingabookaboutJenkinsItgivesagreatoverviewofthetypicalmainingredientsofcontinuousintegrationAndformepersonally,Ialwaysgetaskedifthere’sabookaboutJenkins,andIcanfinallyanswerthisquestionpositively!Butmoreimportantly,thisbookreflectshispassion,andhislongexperienceinteachingpeoplehowtouseJenkins,incombinationwithotherthingsButdon’ttakemywordsforitYou’lljustneedtoreadontoseeitforyourselfKohsukeKawaguchiCreatoroftheJenkinsprojectandArchitectatCloudBeesxiv|ForewordPrefaceAudienceThisbookisaimedatrelativelytechnicalreaders,thoughnopriorexperiencewithContinuousIntegrationisassumedYoumaybenewtoContinuousIntegration,andwouldliketolearnaboutthebenefitsitcanbringtoyourdevelopmentteamOr,youmightbeusingJenkinsorHudsonalready,andwanttodiscoverhowyoucantakeyourContinuousIntegrationinfrastructurefurtherMuchofthisbookdiscussesJenkinsinthecontextofJavaorJVMrelatedprojectsNevertheless,evenifyouareusinganothertechnologystack,thisbookshouldgiveyouagoodgroundinginContinuousIntegrationwithJenkinsWediscusshowtobuildprojectsusingseveralnonJavatechnologies,includingasGrails,RubyonRailsandNETInaddition,manytopics,suchasgeneralconfiguration,notification,distributedbuildsandsecurityareapplicablenomatterwhatlanguageyouareusingBookLayoutContinuousIntegrationislikealotofthings:themoreyouputin,themorevalueyouwillgetoutWhileevenabasicContinuousIntegrationsetupwillproducepositiveimprovementsinyourteamprocess,therearesignificantadvantagestograduallyassimilatingandimplementingsomeofthemoreadvancedtechniquesaswellTothisend,thisbookisorganizedasaprogressivetrekintotheworldofContinuousIntegrationwithJenkins,goingfromsimpletomoreadvancedInthefirstchapter,westartoffwithasweepingoverviewofwhatJenkinsisallabout,intheformofahighlevelguidedtourFromthere,weprogressintohowtoinstallandconfigureyourJenkinsserverandhowtosetupbasicbuildjobsOncewehavemasteredthebasics,wewilldelveintomoreadvancedtopics,includingautomatedtestingpractices,security,moreadvancednotificationtechniques,andmeasuringandreportingoncodequalitymetricsNext,wemoveontomoreadvancedbuildtechniquessuchasmatrixbuilds,distributedbuildsandcloudbasedCI,beforediscussinghowtoimplementContinuousDeploymentwithJenkinsFinally,wecoversometipsonmaintainingyourJenkinsserverxvJenkinsorHudsonAswediscussintheintroduction,Jenkinswasoriginally,andupuntilrecently,knownasHudsonIn,OraclepurchasedSunandinheritedthecodebaseofHudsonInearly,tensionsbetweenOracleandtheopensourcecommunityreachedrupturepointandtheprojectforkedintotwoseparateentities:Jenkins,runbymostoftheoriginalHudsondevelopers,andHudson,whichremainedunderthecontrolofOracleAsthetitlesuggests,thisbookisprimarilyfocusedonJenkinsHowever,muchofthebookwasinitiallywrittenbeforethefork,andtheproductsremainverysimilarSo,althoughtheexamplesandillustrationsdousuallyrefertoJenkins,almostallofwhatisdiscussedwillalsoapplytoHudsonFontConventionsThisbookfollowscertainconventionsforfontusageUnderstandingtheseconventionsupfrontmakesiteasiertousethisbookItalicUsedforfilenames,fileextensions,URLs,applicationnames,emphasis,andnewtermswhentheyarefirstintroducedConstantwidthUsedforJavaclassnames,methods,variables,properties,datatypes,databaseelements,andsnippetsofcodethatappearintextConstantwidthboldUsedforcommandsyouenteratthecommandlineandtohighlightnewcodeinsertedinarunningexampleConstantwidthitalicUsedtoannotateoutputCommandLineConventionsFromtimetotime,thisbookdiscussescommandlineinstructionsWhenwedo,outputproducedbytheconsole(eg,commandpromptsorscreenoutput)isdisplayedinnormalcharacters,andcommands(whatyoutype)arewritteninboldForexample:$lsaltotaldrwxrxrxjohnsmartstaffJan:drwxrxrxjohnsmartstaffJan:rwrrjohnsmartstaffMayownerrwrrjohnsmartstaffAprconfigxmldrwxrxrxjohnsmartstaffMayfingerprintsdrwxrxrxjohnsmartstaffAprjobsdrwxrxrxjohnsmartstaffAprlogdrwxrxrxjohnsmartstaffMaypluginsxvi|PrefacerwrrjohnsmartstaffMayqueuexmlrwrrjohnsmartstaffNovsecretkeyrwrrjohnsmartstaffMayupdatecenterjsondrwxrxrxjohnsmartstaffMayupdatesdrwxrxrxjohnsmartstaffApruserContentdrwxrxrxjohnsmartstaffFebusersdrwxrxrxjohnsmartstaffMaywarWherenecessary,thebackslashcharacterattheendofthelineisusedtoindicatealinebreak:youcantypethisallononeline(withoutthebackslash)ifyoupreferDon’tforgettoignorethe“>”characteratthestartofthesubsequentlinesit’saUnixpromptcharacter:$wgetOhttp:jenkinsciorgdebianjenkinsciorgkey>|sudoaptkeyaddForconsistency,unlesswearediscussingaWindowsspecificissue,wewilluseUnixstylecommandprompts(thedollarsign,“$”),asshownhere:$javajarjenkinswaror:$svnlistsvn:localhostHowever,unlesswesayotherwise,Windowsuserscansafelyusethesecommands

用户评价(0)

关闭

新课改视野下建构高中语文教学实验成果报告(32KB)

抱歉,积分不足下载失败,请稍后再试!

提示

试读已结束,如需要继续阅读或者下载,敬请购买!

文档小程序码

使用微信“扫一扫”扫码寻找文档

1

打开微信

2

扫描小程序码

3

发布寻找信息

4

等待寻找结果

我知道了
评分:

/49

Jenkins.The.Definitive.Guide

仅供在线阅读

VIP

在线
客服

免费
邮箱

爱问共享资料服务号

扫描关注领取更多福利