Upload
leon-chuang
View
675
Download
2
Embed Size (px)
DESCRIPTION
Citation preview
AutoBuild
HRISSVD1
莊子遷 (Leon Chuang)
2007.6.25
大綱
什麼是 AutoBuild? (What) 為何要 AutoBuild? (Why) 怎麼做 AutoBuild? (How)
工具 實作內容 demo
結語
什麼是 AutoBuild?
程式碼建置流程 (Build) 自動化 (Auto) 方便後續之 Deploy 方便取得各個版本
為何要 AutoBuild?
避免必須依賴[人]進行持續性手動建置 Daily-Paul-Build Daily-Leon-Build 不太好吧 ! Daily-Paul-Build AutoBuild 省事多了 !
避免因[人]的延誤導致下游無法工作 Seily : 『 Paul, 開發機今天的換版好了沒 ? 我昨天寫好的統計報表怎麼都跑不出來呢 ? 我明明有Check in到 Source Safe啊 !』 Paul :『換版要 30分鐘哦,換好再通知妳』
Lynn :『今天怎麼還沒換版呢 ?』 Paul( 在家裡發高燒 ) :『完了 ! 沒人換版 !...(頭好像更燒了 )』
怎麼做 AutoBuild?
現成的工具軟體 CruiseControl.NET :原始碼異動監看、排程控制、現成的軟體外掛模組 (NAnt, NUnit…) 、紀錄檔、通知…
NAnt :強化版的批次工具軟體 自製的批次工具
VSSHistoryParser :轉換 Visual SourceSafe History Report 工具
BatchSQL :批次執行 SQL 指令檔工具 Batch File + Task Scheduler :額外的整合批次檔搭配排程控制器
工具 (1) - CruiseControl.NET
Integration Process
工具 (1) – CruiseControl.NET ( 續 )
工具 (2) - NAnt
功能強大的批次命令執行工具 經由設定檔 (xml format) 進行命令集設定 設定檔內可使用變數 可使用的功能如 FileSystem Control 、 Code
Repository Access 、 Code Compile 、 Compress Files 及 MailSend 等等…
NUnit 、 NDoc 的支援 支援自訂 Script
工具 (3) - BatchSQLCustomers.sql-- simple query --select CustomerID,CompanyName,City from Customers where City = 'Sao Paulo'
Orders.sql-- -- simple query with error field name [EmployeeIE] --select OrderID,CustomerID,EmployeeIE from Orders
Products.sql-- simple query --select ProductID,ProductName,QuantityPerUnit,UnitPrice,UnitsInStockfrom Products where UnitPrice>80.0
工具 (4) - VSSHistoryParser
SS.exe
VSSHistoryParser
For BatchSQL
實作內容 (1) – 架構 Build Server
CruiseControl.NET 設置 ccnet.config Webdashboard 設定虛擬目錄 ccnet.exe(run as console application) or
ccservice.exe(run as windows service)
NAnt BatchSQL VSSHistoryParser 設置 Build-File
實作內容 (2) – CCNet 專案
DBScriptSolution 更新資料庫物件如: View, Function, Stored-
Procedure, Trigger 等…
DGPRSBSolution 更新網站應用程式 (HR_DGPRSB)
DGPRSBRPTSolution 更新 Reporting Server 上之報表
(HR_DGPRSB_RPT)
ReportJobSolution 更新批次報表應用程式及批次報表檔
DEMO – AutoBuild 操練
結語
Paul :有 AutoBuild 真好,不用每天9:00~9:30 邊換版邊要擔心太晚換版了
Seily :終於不用每天早上追問 Paul 到底有沒有換好開發機的版本, AutoBuild 真厲害
Lynn :不用怕 Paul 又感冒發燒,有 AutoBuild搞定換版
Leon :不用 Daily-Leon-Build 就好了…
Q & A
參考資料
CruiseControl.NET Home NAnt Home NUnit Home NDoc Home