enterprise automation: canonical automation for the€¦ · 1. system automation – back up /...
TRANSCRIPT
Enterprise Automation:
Canonical Automationfor the
Evolving Codebase Vince MaioranaTechnical Lead / Supervisor SQA
R 1.1
5/4/2007 BLUESHIFT TECHNOLOGIES Page 2
5/4/2007 BLUESHIFT TECHNOLOGIES Page 3
Objective
Enterprise-Level Automation
Goals:1. Create Tools, Policies, and Procedures2. Support Test and Manufacture
5/4/2007 BLUESHIFT TECHNOLOGIES Page 4
Source Code Control
Before Perforce
5/4/2007 BLUESHIFT TECHNOLOGIES Page 5
A Better Way
5/4/2007 BLUESHIFT TECHNOLOGIES Page 6
“Table Driven” Categories
• Solution• DLL• License• Configuration File
Sample
5/4/2007 BLUESHIFT TECHNOLOGIES Page 7
Manage Rapid Change of Software Components
A Static Set of “Make Files” Have Short Duration
Reality: Rapidly Flexing Items
– Projects: Are Dynamic– Components: Grow More Complex– Dependencies: Are Intricate– Libraries: Are Highly Coupled During Development
5/4/2007 BLUESHIFT TECHNOLOGIES Page 8
Table Detail
5/4/2007 BLUESHIFT TECHNOLOGIES Page 9
5/4/2007 BLUESHIFT TECHNOLOGIES Page 10
System Approach
1. Drive Solutions and Projects via Table
2. Map Products { Components Version}
3. Manage Embedded OS Image
4. Handle Graphics Binary Objects
5/4/2007 BLUESHIFT TECHNOLOGIES Page 11
Two Entry Points
Automatic Manual
Build System
Automatic and Manual Build Schedule
5/4/2007 BLUESHIFT TECHNOLOGIES Page 12
Goperl %INIT%/runbuild.pl -B -T -L -Z -M -D -Q -X -SM -W:TIMER -K -P -N -R:2 -log
-R Registered Trademark-N Label source code-Q CodeVeil
-C Current (notMain Line) branch build
+V:x: labels Does not increment
Build Number. Appends "x" to theversion specified by
the "labels" file.
-B Batch option-T Trial option
(echo and exit)-M eMail notification
-L generate ‘BOM’ List-Z import productiZed-X call to DoXygen-SM call Standards Master-W: <definition> #define -F: <Feature to build>-H QA Test Harness-D Deployment package-K StrongName assembly signing
-P Perforce changes reports
5/4/2007 BLUESHIFT TECHNOLOGIES Page 13
Summary
• Process: High Level Table• Compile: Via “Web” Page
– Keep Details “Behind” Brick Wall– Use Scripts to Automate the Details
5/4/2007 BLUESHIFT TECHNOLOGIES Page 14
ImplementGoals:
1. Create Tools, Policies, and Procedures2. Support of Test and Manufacture
1. System Automation 2. Build Automation3. Triggers
5/4/2007 BLUESHIFT TECHNOLOGIES Page 15
Originate / Automate The Enterprise
1. System Automation – Back Up / Perforce Check-Points– ‘Nightly Build’ Feedback– Manufacturing Support
2. Build Automation– “Bootstrap”able– Lines:
• Main, Current, Bug Fix, Product, Project, Personal Branch
– Client Templates• Production and Bug Fix Client WorkSpec
5/4/2007 BLUESHIFT TECHNOLOGIES Page 16
Originate / Automate The Enterprise
3. Triggers• Link
To Bugzilla• Distribute
Change Notification• Enforce
Technical Polices and Procedures
5/4/2007 BLUESHIFT TECHNOLOGIES Page 17
System
• Integrate External Tools• Manage Objects• Build System
– Build Automation System– Build System Flow
5/4/2007 BLUESHIFT TECHNOLOGIES Page 18
System
• Integrate External Tools– .NET Signing, VerSign, .NET Obfuscation
• Manage Objects: – Firmware/Software– Hardware Graphics– Perforce Client Workspaces
5/4/2007 BLUESHIFT TECHNOLOGIES Page 19
Build System
Build System
Back Up
Perforce
Bugzilla Test
5/4/2007 BLUESHIFT TECHNOLOGIES Page 20
Build Automation
C:\initProcess Boot-Strap
5/4/2007 BLUESHIFT TECHNOLOGIES Page 21
Generated Meta Commands*
perl runbuild.pl -B -Tcall c:\init\cleanall.batC:CD C:\IPPerforce\Software\QASystems\QAtools\buildScripts
perl increaseDLLversion.plperl MakeRules.plperl SetQAToken.plperl updateAssemblyInfo.pl -K -R:2 cscript unattended.js //nologocall runp4Report.bat *Salient commands
5/4/2007 BLUESHIFT TECHNOLOGIES Page 22
Beyond The Bootstrap
C:\init call c:\init\cleanall.batperl increaseDLLversion.plperl MakeRules.plperl SetQAToken.plperl updateAssemblyInfo.pl -K -R:2 cscript unattended.js //nologocall runp4Report.bat
projectFile.txt
5/4/2007 BLUESHIFT TECHNOLOGIES Page 23
Kick-Off Build
5/4/2007 BLUESHIFT TECHNOLOGIES Page 24
Simplified Flow
perl C:/init/runbuild.pl -B -L -Z -M -Q -W:TIMER -K +V:1468/A:Fri_01_19_2007_11_01_30 -R:2
runbuild.pl: Top level build script
• Backing up the last build• Recursively delete local storage• Retrieve build scripts and data needed
Client vmaiorana_Tools saved. (Bring down C:\init bootstrap)Client vmaiorana_Tools deleted.Client vmaiorana_Sourcecode saved.
Prepend QA token identification to the DLL. Identify DLLs in the field 31 AssemblyVersion.cs files automatically updated.
5/4/2007 BLUESHIFT TECHNOLOGIES Page 25
Simplified Flow
#define BST_QA_BUILD// DO NOT CHANGE THIS AUTOMATICALLY GENERATED FILE// THIS FILE IS generated and modified by QA //#if BST_QA_BUILD[assembly: AssemblyVersion("1.0.0.1528")] #else[assembly: AssemblyVersion("0.0.0.0")] #endif
Microsoft (R) .NET Framework Strong Name UtilityKey pair written to BSTkeypair.snk________________________________________________________________Entering unattended.jsWrote copyresults.html copy reportMoving copyresultsFinished quickreport.bat and report colorizationproductRelease was deleted and re-shared successfully
5/4/2007 BLUESHIFT TECHNOLOGIES Page 26
Simplified Flow
Compilation successful - 64 built 126 succeeded, 0 failed, 0 skipped
SAP_generator.pl - Generating SAP numbers … completedBOM generation starting … completed
Obfuscating ...
Copy to C:\CustomerShip 25 file(s) copied.Copy Non EXEs, Unmanaged EXEs, license(s), Batch file, third-party
lib, icon
5/4/2007 BLUESHIFT TECHNOLOGIES Page 27
Simplified Flow
productize.pl - moving components into "Products" directoryproductize.pl - importing components into archive
Client vmaiorana_Product saved.
Change 5345 created with 82 open file(s). Submitting change 5345. Locking 82 files ...
Change 5345 submitted.Client vmaiorana_Product deleted.
productize.pl – completed
sendmail.exe
Client vmaiorana_Sourcecode deleted
5/4/2007 BLUESHIFT TECHNOLOGIES Page 28
Published Build Page
5/4/2007 BLUESHIFT TECHNOLOGIES Page 29
Bug & Change Triggers
Prompt form-out change “bugform.bat %formfile%"
Enforce change-submit //depot/... "commentSyntax.bat %change%"
eMail change-commit //depot/... "jobCheck.bat %changelist%" Enforce
Prompt
http://issues/show_bug.cgi?id=84eMail
Bugzilla
[email protected] [5346] Administrator@kreed_projects 2007/02/22 12:20:38 Thu 12:20:38 PM
5/4/2007 BLUESHIFT TECHNOLOGIES Page 30
'Bug’ Comment Prompt
call bug.bat %1 copy temp_out_%~n1 %1 del /F /Q temp_out_%~n1exit /B 0
bugform.bat
call sed s/.enter.description.here./Bug=/g < %1 > temp_out_%~n1bug.bat
Bug=0Means Development
5/4/2007 BLUESHIFT TECHNOLOGIES Page 31
Enforce
commentSyntax.bat@echo offif "%1" == "" goto error
p4 -u administrator describe %1 > here_%1%.txtfindstr /I "Bug.*=.*" here_%1%.txt
if %errorlevel% EQU 0 goto doneecho.echo Comment must containecho Bug = nnnnecho. or Bug = 0 for development.echo.exit /B 1
:done:errorexit /B 0
Doc=0;Test=0 also
5/4/2007 BLUESHIFT TECHNOLOGIES Page 32
jobcheck.bat@echo offif not x%1==x goto okecho Missing %0[change#]:okcall j.bat %1 > NULif errorlevel 1 echo Missing changelist %1exit /B 0
j.bat@echo offcall cscript.exe //nologo mailchanges.js %1exit /B 0
5/4/2007 BLUESHIFT TECHNOLOGIES Page 33
System Architecture
• Depot Architecture• Branch Architecture• Perforce Client
– Sample Client
5/4/2007 BLUESHIFT TECHNOLOGIES Page 34
Depot Architecture
SAPGraphicsProducts Projects QA V CGF
2D, 3
D Rea
l Tim
e Mod
els
.NET S
olutio
ns
40+ P
roduc
ts
810-
0101
_1.0
.0.1
195
Automati
on
Robot
Config
uratio
ns
Automati
c Vers
ion ID
, Auto
matic S
igning
5/4/2007 BLUESHIFT TECHNOLOGIES Page 35
‘Version’ and ‘Current’ BranchMethodology
Solution Files Source Files Source Files
Produc
ts
Projec
ts
ProtoP
rojec
tsA.B.C.D.nnnn
A.B.C.D.nnnn
A.B.C.D.nnnn[model]
A.B.C.D.nnnn
CurrentCurrentCurrent
A.B.C.D.nnnn
A.B.C.D.nnnnA.B.C.D.nnnn[model]
A.B.C.D.nnnn
IPPerforce_Y_Developer
MainLine
Automatically Assign Version Number#if BST_QA_BUILD
[assembly: AssemblyVersion("1.0.0.1514")] // A.B.C.D#else[assembly: AssemblyVersion("0.0.0.0")] // A.B.C.D#endif
5/4/2007 BLUESHIFT TECHNOLOGIES Page 36
What Kind of Clients?
Merge Branch QA
Frozen
QA
Developer
Reports
5/4/2007 BLUESHIFT TECHNOLOGIES Page 37
Partial Perforce Client
Projects//IPPerforce/Software/Projects/External/BlueShift/BSTQlc/1468/...
//template_QLC_3.0.0.1468/Software/Projects/External/BlueShift/BSTQlc/...
//IPPerforce/Software/Projects/Internal/Common/BSTCommon/1468/... //template_QLC_3.0.0.1468/Software/Projects/Internal/Common/BSTCommon/...
ProtoProjects//IPPerforce/Software/ProtoProjects/3DEngine/3dEngine/1468/...
//template_QLC_3.0.0.1468/Software/ProtoProjects/3DEngine/3dEngine/...
Configuration//IPPerforce/Software/Configuration/SoftwareTool/1468/...
//template_QLC_3.0.0.1468/Software/Configuration/SoftwareTool/...
5/4/2007 BLUESHIFT TECHNOLOGIES Page 38
Other Clients
Transitory QA Clients
_Versions Manage Versions
_Product Product WorkSpec
_Tools Obtain Tools
5/4/2007 BLUESHIFT TECHNOLOGIES Page 39
Non Perforce Scripts
Helper Function
setTimer.pl, setMySQL.pl, setWinLogo.pl
Set ENVIRONMENT variables
errorcheck.pl , errorsum.pl Collect Errors from 3rd Party Toolsrundoxygen.pl Run 3rd Party Doxygen ToolStandardsVerifier2005.pl Run 3rd Party Standards Master Toolobfuscate.pl Call ObfuscatorsetProjConstant.pl Sets a #define symbol in a VS 2005 ProjectSAP_generator.pl Generate SAP module directory structureverifyFiles.pl Verify existence of build products
Tangential Scripts
5/4/2007 BLUESHIFT TECHNOLOGIES Page 40
Process
• QA /Dev Role & Responsibility• SCRUM • Process Model
–P&P Objectives–P&P Description–Tools & Reports
5/4/2007 BLUESHIFT TECHNOLOGIES Page 41
QA and Release
Roles & ResponsibilityQA & Test Automated Release Control Engineering Automatic Build Management System Test
Automation ScriptsTest Framework Design
LabelsStorage PackagingBuild System OperationAdministration / Installation
5/4/2007 BLUESHIFT TECHNOLOGIES Page 42
SCRUM: Test Readiness Procedure
Plan: Use SCRUM Descriptors into Perforce
1. Today?
2. Tomorrow?
3. Blocked?
5/4/2007 BLUESHIFT TECHNOLOGIES Page 43
P&P Objectives
P&P Description1. FAQ Published / Test Results Published2. Test Readiness and Test Cycle Entry3. Kick-Back Cycle4. How to Use Perforce and Branches
P&P Enforcement1. Triggers2. Test Harness Regression 3. API Test & Regression4. Quality Control Software
BranchesBuild PageBlueShift ReportsAutomated Release Notes
5/4/2007 BLUESHIFT TECHNOLOGIES Page 44
P&P Process Model
Work In Progress
Release Control
QA Perforce
IssueEnhancement
BlueShift CustomerCustomer/TRB
Issue Tracker
CTO/ Manager / Lead
Kick-Back
Release
BOM
TCIR=nnnn alias
KickBack
Legend
5/4/2007 BLUESHIFT TECHNOLOGIES Page 45
P&P Description
Policy/Procedure
5/4/2007 BLUESHIFT TECHNOLOGIES Page 46
P&P Description
5/4/2007 BLUESHIFT TECHNOLOGIES Page 47
‘Kick-Back’Notification to Developers
Standards Master
Example Executive Summary Example Detail
5/4/2007 BLUESHIFT TECHNOLOGIES Page 48
Summary
• System Automation – Automatic BackUps– On-Demand Build Page– Modules Automatically Categorized for Manufacturing
• Build Automation– Build Error Distribution– “Bootstrap-able”– Lines:
• Main, Current, Bug Fix, Product, Project, Personal Branch– Templates
• Production and Bug Fix Client WorkSpec
• Trigger Functions– Build, Bug, Doc, Test Notices are Distributed– Enforce Technical Polices & Procedures