Subversion

1. subversion server    : http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=11151&expandFolder=11151&folderID=91

    Apache 2.2이상과 연동을 위해 Setup-Subversion-1.6.6.msi 설치

2. svnserve manager    : http://www.pyrasis.com/main/SVNSERVEManager

    subversion server 관리툴. 이것 대신에 직접 실행, 윈도우 서비스 실행, Apache로 실행 의 경우엔 필요 없습니다.

    SVNManager-1.1.2-Setup.msi 설치

3.subversion client    : http://tortoisesvn.net/    (widonws용 client + language pack)

    탐색기에서 편리하게 사용할 수 있는 client 툴

    TortoiseSVN-1.6.12.20536-win32-svn-1.6.15.msi 및 언어팩(LanguagePack_1.6.12.20536-win32-ko.msi) 설치

4.AnkhSVN        : http://ankhsvn.open.collab.net/

    Visual Studio SVN Plugin. AnkhSvn-2.1.10019.14.msi 설치

 

repository 생성    sample 디렉토리 생성 후 "TortoiseSVN > 현재 위치에 저장소 생성"

    (c:\svn> svnadmin create sample)

 

repository 설정 (conf 디렉토리)

    svnserve.conf

        anon-access = none

        auth-access = write

        password-db = passwd

        authz-db = authz

        realm = My svn Repository

    passwd

        ffaaa = ffaaa

    authz

[/]

ffaaa = rw

 

svn 실행

    1. 명령으로 실행 : c:\> svnserve -d -r c:\svn --listen-port 3690

    2. 윈도우 서비스 모드

        # 컴퓨터 이름 확인

        C:\> echo %COMPUTERNAME%

        # 서비스로 등록 (sc 명령)

        C:\> sc \\YAMOE create svnserve

binpath= "C:\Program Files\Subversion\bin\svnserve.exe --service -r C:\svn --listen-port 3690"

DisplayName= "Subversion svnserve"

        #서비스 시작 : 혹은 관리도구의 서비스에서 실행

        C:\> net start "Subversion svnserve"

        #서비스 중지

        C:\> net stop "Subversion svnserve"

        #서비스 삭제

        C:\> sc \\YAMOE delete svnserve

    3. svnserve manager 사용 : svn 저장소 상위 디렉토리 설정

 

svn 명령을 통한 subversion 사용시

    기본 에디터 지정

        SVN_EDITOR 환경변수로 c:\windows\notepad.exe 등록

        기본 에디터는 메시지 입력시 사용될 에디터 프로그램을 지정하며

        에디터 지정 없이 svn 명령 사용시 마다 -m '로그 메시지' 를 사용할 수도 있습니다.

        Ex) svn ci -m "수정하였습니다."

 

    svn 명령 실행

        svn mkdir svn://127.0.0.1/sample/trunk

 

저장소 백업(dump)

    c:\svn> svnadmin dump sample > sample.dump

저장소 복원(load)

    c:\svn> svnadmin create sample2

    c:\svn> svnadmin load sampl2 < sample.dump

 

 

 

PowerShell (http://technet.microsoft.com/ko-kr/scriptcenter/dd742419.aspx)

    http://support.microsoft.com/kb/968929 의 "Windows 관리 프레임워크 핵심 WinRM 2.0 및 Windows PowerShell 2.0" 부분에서

OS 별 PowerShell 다운로드 및 설치. (Windows 7은 기본적으로 PowerShell 2.0이 설치되어 있음)

 

용도

자동 버전 업데이트 스크립트(cruisecontrol.net의 state파일에서 버전을 읽어와 버전 증가 후 visual studio 프로젝트의 리소스 파일(.rs)에 버전 기록)

프로젝트 생성 스크립트(subversion 저장소와 trac 프로젝트 생성)

    Subversion과 PDB 파일 연동 (subversion 저장소 정보를 PDB 파일에 기록)

    Trac 동기화 스크립트 (Subversion 저장소와 Trac 프로젝트의 데이터를 최신 상태로 유지. PowerShell은 모든 Trac 프로젝트의 디렉토리를 순회하며 trac-admin의 resync 명령을 실행할때 사용)

     Trac 버전 업데이트 스크립트 (CruiseControl.NET으로 빌드된 파일 버전을 Trac에 자동 등록. PowerShell은 CruiseControl.NET의 state파일(xml)에서 버전을 읽어와 Trac에 등록시 사용)

    Trac을 통해 파일 배포할 때의 파일 처리 스크립트 (Trac을 통해 빌드된 파일 배포시 사용. PowerShell은 빌드된 파일의 커밋 로그 메시지 처리시 사용)

    백업 스크립트 (Subversion 저장소 및 Trac 프로젝트 백업)

 

 

심볼파일(PDB)과 Subversion 연동

: Debugging Tools for Windows & Active Perl

심볼파일(PDB, Program DataBase) 에 Subversion 저장소 정보를 인덱싱한 뒤 Symbol Server에 저장하여

문제 발생시 해당 심볼파일이 작성된 subversion이 revision 정보를 알 수 있도록 함

 

1. Debugging Tools for Windows 설치 : http://www.microsoft.com/whdc/devtools/debugging/default.mspx

    Subversion과 연동하기 위해 Source Server 선택해야 함. (svn.pm이 포함되어 있음)

    Debugging Tools for Windows는 Subversion 인덱싱 스크립트인 svn.pm 파일을 사용하기 위해 설치

    http://www.microsoft.com/downloads/en/details.aspx?FamilyID=6b6c21d2-2006-4afa-9702-529fa782d63b&displaylang=en에서 winsdk_web.exe 다운로드 및 설치

 

2. Active Perl 설치 : http://www.activestate.com/activeperl/downloads

    Active Perl은 PDB파일에 Subversion 저장소 정보를 인덱싱하는 svn.pm 파일을 실행하기 위해 설치 (svn.pm이 perl로 작성되어있음)

    ActivePerl-5.12.3.1204-MSWin32-x86-294330.msi 다운로드 및 설치

 

3. svn.pm 파일 수정 : C:\Program Files\Debugging Tools for Windows (x86)\srcsrv\svn.pm

    line 161 : if ( $curline =~ m/^Path:[\s\t]*(.*)$/i ) {

    line 161 : if ( $curline =~ m/^Path|경로:[\s\t]*(.*)$/i ) {

 

    line 191 : if ( $curline =~ m/^Revision:[\s\t]*(\d*)$/i ) {

    line 191 : if ( $curline =~ m/^Revision|리비전:[\s\t]*(\d*)$/i ) {

 

    line 199 : if ( $curline =~ m/^Path:[\s\t]*(.*)$/i ) {

    line 199 : if ( $curline =~ m/^Path|리비전:[\s\t]*(.*)$/i ) {

 

4. 시스템 변수(환경 변수) Path 추가

    C:\Program Files\Debugging Tools for Windows (x86)\srcsrv\

 

5. svn에 visual studio 프로젝트 생성 후 *.suo, *.ncb, *.user Debug 제외설정

6. "프로젝트 속성 > C/C++ > General > Debug Information Format" 이 "Program Database(/Zi)" 로 설정되어 있는지 확인

    vs 6.0은 "project settins > C/C++ > General > Debug info: "이 "Program Database"로 설정되어 있는지 확인

7. 프로제트를 Release모드로 컴파일 후 svn에 커밋

8. 명령 프롬프트에서 프로젝트 홈디렉토리 이동 후 svnindex.cmd 명령 실행

    C:\console> svnindex.cmd /debug /source=C:\console /symbols=C:\console\Release

        /source : 현재 작업 디렉토리의 최상위 경로. 절대경로만 가능.

        /symbols : Release 모드로 빌드된 PDB 파일 경로. 절대 혹은 상대 경로 가능.

    실패시 "... zero source files found ..."가 출력되며 지금까지 설정 확인 필요

9. srctool.exe로 PDB에 Subversion 저장소 정보가 정확히 들어갔는지 확인.

    c:\console\Release> srctool.exe console.pdb

 

CruiseControl.NET

    1. IIS 및 ASP.NET(.NET Framework 2.0 이상) 설치 : CruiseControl.NET의 Web DashBoard 사용을 위해 필요.

        http://www.microsoft.com/downloads/ko-kr/details.aspx?displaylang=ko&familyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5 에서 dotnetfx.exe 다운로드 및 설치

    2. CruiseControl.Net 설치 : http://sourceforge.net/projects/ccnet/

        CruiseControl.NET-1.6.7981.1-Setup.exe 다운로드 및 설치

 

    3. 실행방법

        C:\Program Files\CruiseControl.NET\server\ccnet.exe 파일을 직접 실행시키거나

        CruiseControl.NET 서비스의 "속성 > 로그온"에서 계정 지정에 Administrator 계정의 ID/Password 지정하여

        서비스로 구동시킵니다.

 

    4. 외부에서 접속시 방화벽 관련 포트

        80 port        : webdashboard 접속을 위해 열어둘 포트 (IIS)

        21234 port     : CCTray가 다른 컴퓨터에 설치되어 접속할때 열어둘 포트

 

CCTray

    CruiseControl.Net 클라이언트 프로그램

http://sourceforge.net/projects/ccnet/files/CruiseControl.NET%20Releases/CruiseControl.NET%201.6/ 에서

CruiseControl.NET-CCTray-1.6.7981.1-Setup.exe 다운로드 및 설치

 

    방화벽 관련

CCTray는 CruiseControl.NET 서버의 21234 port를 통해 접속함.

 

CruiseControl.NET 설정

    CruiseControl.Net 서버 설정 파일 : C:\Program Files\CruiseControl.NET\server\ccnet.config

        초기 설치시]

<cruisecontrol xmlns:cb="urn:ccnet.config.builder">

            <!-- This is your CruiseControl.NET Server Configuration file. Add your projects below! -->

            <!--

                <project name="MyFirstProject" />

            -->

</cruisecontrol>

 

        Ex]

        <cruisecontrol>

            <project name="hello"></project>        <!-- 각 프로젝트 설정 -->

            <project name="world "></project>

        </cruisecontrol>

 

    <labeller> : 빌드 넘버 표시 방식을 지정하는 태그

        type 속성의 값은 대소문자를 구분 합니다.

 

        Ex] type = defaultlabeller

        <project>        <!-- labeller는 <project></project> 안에 위치함 -->

            <labeller type="defaultlabeller">    <!-- defaultlabeller의 labeller의 첫 l은 소문자 표기 필수 -->

                <prefix>1.0.</prefix>        <!-- prefix 생략 가능>

                <incrementOnFailure>true</incrementOnFailuer>    <!-- 기본값 false이며 true인 경우 빌드 실패시에도 빌드 넘버 증가-->

            </labeller>

        </project>

 

        Ex] type = dateLabeller : 날짜를 빌드 넘버로 사용 (2007.8.5.1 : 2007년 8월 5일 1번째 빌드)

        <project>

            <labeller type="dateLabeller" />

        </project>

 

        Ex] type = fileLabeller : 파일에 빌드 넘버 저장하고 사용하며 빌드 넘버를 변하지 않고 파일에 저장된 빌드 넘버를 변경해야 적용됨.

        <project>

            <labeller type="fileLabeller">

                <!-- version.txt 내용 예 : 678 또는 1.1 또는 alpha, beta 가능 -->

                <labelFilePath>C:\build\version.txt</labelFilePath>    <!-- 필수 -->

                <allowDupllicateSubsequentLabels>true</allowDuplicateSubsequentLabels>

                <prefix>1.0.</prefix>        <!-- 생략 가능 -->

            </labeller>

        </project>

        

        Ex] type = iterationLabeller : 빌드 넘버 증가 방식은 defaultlabeller와 동일

        <project>

            <labeller type="iterationLabeller">

                <prefix>1.0.</prefix>        <!-- 생략 가능 -->

                <duration>1</duration>    <!-- 생략가능. 몇주를 1주일로 볼건지 지정. 기본값 2 -->

                <releaseStartDate>2007/10/01</releaseStartDate>    <!-- 필수. 프로젝트의 릴리즈 날짜 -->

                <separator>.</separator>    <!-- 생략 가능. 기본값 . -->

            </labeller>

        </project>

        <!--

            <releaseStartDate>가 2007/10/01, <duration>이 1, 오늘날짜(빌드한 날짜)가 2007/10/16 이면

            2주가 지났으며 <duration> 이 1이므로 2가 되어 1.0.2.1 이 됨. (prefix.2.buildnumber)

            <duration>이 5이고 10주가 지났다면 2가 됨.

        -->

 

        Ex] type = remoteProjectLabeller : 다른곳의 CruiseControl.NET과 연동하는 방식

192.168.0.100의 CruiseControl.NET이 실행되고 있고, sample 프로젝트가 1.0.1로 빌드되었다면 1.0.1을 그대로 가져와 사용

        <project>

            <labeller type="remoteProjectLabeller">

                <project>sample</project>

                <!-- 현재 CruiseControl.NET에서 빌드된 프로젝트 빌드 넘버를 가져옴 -->

                <serverUri>tcp://192.168.0.100:21234/CruiseManager.rem</serverUri>

            </labeller>

        </project>

 

        Ex] type = stateFileLabeller : 현재 CruiseControl.NET에서 빌드되고 있는 다른 프로젝트의 빌드 넘버를 가져옴

            각 프로젝트 빌드 넘버는 C:\Program Files\CruiseControl.NET\server 아래에 "프로젝트명.state"로 저장 되어 있음.

        <project>

            <labeller type="stateFileLabeller">

                <project>sample</project>    <!-- sample 프로젝트의 빌드 넘버를 가져옴 -->

            </labeller>

        </project>

 

    <sourcecontrol> : Subversion, CVS, Perforce, Visual Sourcesafe 등에서 빌드시 마다 소스를 자동으로 업데이트 가능.

        <sourcecontrol type="svn">        <!-- svn과 연동-->

            <trunkUrl>svn://192.168.0.100/example/trunk</trunkUrl>    <!-- 소스를 업데이트 받을 저장소. branch도 지정 가능 -->

            <workingDirectory>C:\build\example</workingDirectory>    <!-- 소스 체크아웃할 경로 -->

 

            <!-- 기타설정 : svn.exe 경로 직접 지정시 사용. 보통 Path 환경변수에 등록하여 사용 -->

            <executable>c:\apps\svn.exe</executable>

 

            <!-- 기타설정 : svn 접속 계정 및 암호 -->

            <username>sampleuser</username>

            <password>1234</password>

 

            <!-- 기타설정 : 빌드시 소스 자동 업데이트 지정. 기본값 true -->

            <autoGetSource>true</autoGetSource>

 

            <!-- 기타설정 : 빌드 성공시 태깅 사용 여부 및 태깅할 svn 주소 지정 -->

            <!-- 아래 예는 빌드 넘버가 1.0.1이라면 svn://192.168.0.100/example/tags/1.0.1에 trunk가 태그 됨-->

            <tagOnSuccess>true</tagOnSuccess>    

            <tagBaseUrl>svn://192.168.0.100/example/tags</tagBaseUrl>

 

            <!-- 지정한 시간 동안 svn.exe 명령 실패시 빌드 실패로 지정. 기본값 10분. units 미지정시 밀리초(ms)로 계산 -->

            <timeout>60000</timeout>

            <timeout units="millis">60000</timeout>

            <timeout units="secondes">60</timeout>

            <timeout units="minutes">5</timeout>

            <timeout units="hours">1</timeout>

 

        </sourcecontrol>

 

    <tasks> : 실제 소스 컴파일 설정 지정. vs 6, vs 2005, MSBuild 등 도구 사용 설정 혹은 특정 프로그램 실행 가능.

        [Visual Studio 2005인 경우]

        <tasks>

            <devevn>

                <solutionfile>C:\build\example\exaple.sln</solutionfile>    <!-- 솔루션 파일 지정 -->

                <configuration>Release</configuration>    <!-- Release 혹은 Debug 지정 -->

 

                <!-- 기타 설정 -->

                <buildtype>build</buildtype>    <!-- 빌드 형식 지정(build, rebuild, clean). 기본값 rebuild -->

                <project>sample</project>    <!-- 솔루션의 특정 빌드만 빌드. 미지정시 모든 프로젝트 빌드 -->

 

                <!-- vs2002 혹은 vs2003으로 빌드 할 수 있도록 설정 -->

                <executable>c:\Program Files\Microsoft Visual Studio.NET\Common7\IDE\devenv.com</executable>

 

                <buildTimeoutSeconds>600</buildTimeoutSeconds>    <!-- 지정시간동안 컴파일 미완료시 빌드 실패 처리. 기본값 10분 -->

            </devenv>

            <!-- vs 6인 경우 <devenv> 대신 <exec> 사용

            <exec>

                <executable>"c:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin\MSDEV.COM"</executable>

                <baseDirectory>C:\build\example</baseDirectory>

                <buildArgs>c:\build\example\example.dsw /MAKE "EXAMPLE - Win32 Release" /REBUILD</buildArgs>

            </exec>

            -->

        </tasks>

 

        [VCBuild 인 경우]

         VCBuild : vs2005 부터 제공되는 빌드 도구로 <exec> 사용하여 설정

            <executable> : vcbuild.exe 경로 지정

            <baseDirectory> : 빌드할 소스 코드 경로 지정

            <buildArgs> : 빌드 옵션, 솔루션(혹은 프로젝트) 파일 경로, Realse/Debug 모드 설정, Win32/x64 설정

 

        <tasks>

            <exec>

                <excutable>"C:\Program Files\Microsoft Visual Studio 8\VC\vcpackages\vcbuild.exe"</executable>

                <baseDirectory>C:\build\example</baseDirectory>

                <buildArgs>/rebuild C:\build\example\example.sln "Release|Win32"</buildArgs>

            </exec>

        </tasks>

 

        [tip. /MP 옵션 설정시 멀티 프로세스로 컴파일]

            Ex) /rebuild /MP C:\buld\example\example.sln "Release|Win32"

            참조 : http://msdn.microsoft.com/ko-kr/library/bb385193.aspx

 

        [tip. 64 bit, Debug 빌드]

            <devenv>는 Release, Debug 모드 구분 가능하지만 32 bit, 64 bit 빌드 구분 불가능.

            <devenv>에서 64 bit 빌드하려면 프로젝트 설정에서 Win32 플랫폼 삭제하여 x64만 남겨두어야 함.

            VCbuild는 Release/Debug, 32 bit/64 bit 을 구분 하여 빌드 가능.

            Ex) "Debug|Win32"    : 32bit Debug

            Ex) "Release|x64"    : 64bit Release

 

        [MSBuild]

        MSBuild : vs2005에서 제공해주는 또 다른 빌드 도구 (사용방법 생략)

 

        [Executable]

            <exec> 태그로 콘솔 형식의 외부 프로그램 실행

        <tasks>    <!-- 사용 예 1 -->

            <exec excutable = "C:\example\build.cm" />

        </tasks>

 

        <tasks>    <!-- 사용 예 2 -->

            <exec>

                <excutable>build.cmd</executable>            <!-- 실행할 파일 지정 -->

                <baseDirectory>C:\build\example</baseDirectory>    <!-- 실행파일을 실행할 디렉토리 지정 -->

                <buildArgs>all</buildArgs>                <!-- 실행파일에 전달할 입력값 지정 -->

                <buildTimeoutSeconds>10</buildTimeoutSeconds>

            </exec>

        </tasks>

 

        [Build Publisher]

            <buildpublisher> 태그는 빌드 완료 후 결과물을 특정 디렉토리에 복사해주는 기능 제공.

        <buildpublisher>

            <sourceDir>C:\build\example\release</sourceDir>        <!-- 빌드 완료 후 결과물이 생길 디렉토리 지정 -->

            <publishDir>\\fileserver\example</publishDir>        <!-- 특정 공유 폴더에 복사 지정 -->

            <useLabelSubDirectory>false</useLabelSubDirectory>        <!-- true : publishDir 아래에 빌드 넘버의 이름으로 디렉토리 생성 후 결과물을 복사 -->

                                            <!-- false : publishDir 디렉토리 아래에 계속 덮어씀 -->

                                            <!-- 기본값 : false -->

        </buildpublisher>

 

    Trigger : 빌드 주기를 지정. <scheduleTrigger>, <intervalTrigger>, <projectTrigger>, <urlTrigger>, <filterTrigger>

        <!-- scheduleTrigger : 특정 주기로 빌드

Ex) 매주 월요일 20시에 빌드 시작 -->

        <scheduleTrigger time="20:00" buildCondition="ForceBuild" name="Scheduled">

            <!-- buildCondition    = IfModificationExists : 저장소에 변경사항 있는 경우에만 빌드 수행. 기본값

                        = ForceBuild : 무조건 빌드 수행    -->

            <weekDays>        <!-- 빌드할 요일 지정. 미지정시 매일 빌드 수행 -->

                <weekDay>Monday</weekDay>

            </weekDays>

        </scheduleTrigger>

 

        <!-- intervalTrigger : 지정된 시간마다 반복적으로 빌드 수행.

Ex) 30초마다 무조건 빌드 -->

<intervalTrigger name="continuous" seconds="30" buildCondition="ForceBuild" />

 

        <!-- projectTrigger : 다른 곳의 CruiseControl.NET의 특정 프로젝트 빌드 완료시 빌드 시작 지정 -->

        <projectTrigger serverUri="tcp://192.168.0.100:21234/CruiseManager.rem" project="sample">    <!-- serverUri로 다른 곳의 CruiseControl.NET 주소 지정 -->

            <triggerStatus>Success</triggerStatus>    <!--    Success : 원격지 프로젝트 빌드 성공시 빌드 시작. 기본값

                                        Failure : 원격지 프로젝트 빌드 실패시 빌드 시작

                                        Exception : 원격지 프로젝트 빌드가 실패하지 않았지만 다른 부분에서 실패시 빌드 시작

                                    -->

            <innerTrigger type="intervalTrigger" seconds="30" buildCondition="ForceBuild" />    <!-- 지정한 시간 간격으로 원격지 프로젝트의 빌드 결과 검사 -->

        </projectTrigger>

 

        [tip. Success, Failure, Exception 확인 방법 : <projectTrigger> 관련]

        CCTray에서 프로젝트의 상태가 아이콘으로 표시되지만

        더 자세한 정보는 "C:\Program Files\CruiseControl.NET\server\프로젝트명.state" 파일의

<Status>와 <LastIntegrationStatus> 에 빌드 상태에 따라 Success, Failure, Exception 표시 됨.

<Status>는 현재 상태를 의미.

<LastIntegrationStatus>는 마지막 상태를 의미. (현재 빌드의 바로 직전 상태)

 

<!-- uriTrigger : 특정 URL 웹페이지 변경시 빌드 시작하며 지정한 시간 주기로 웹페이지 변경 검사 -->

<uriTrigger url="http://192.168.0.200/page.html" seconds="30" buildCondition="ForceBuild">

 

        <!-- filterTrigger : 지정된 시간안에 하위 트리거의 실행 여부 제어

            Ex) 매주 일요일 60초마다 빌드하지만 22시에서 23시 사이엔 빌드 하지 않음을 지정 -->

        <filterTrigger startTime="22:00" endTime="23:00">

            <trigger type="intervalTrigger" seconds="60" />

            <weekDays>

                <weekDay>Sunday</weekDay>

            </weekDays>

        </filterTrigger>

 

        [tip. 설정파일의 주석 등에 한글 사용시]

        1. ccnet.config 첫째줄에 encoding 속성을 UTF-8로 설정

        2. 설정파일에 <?xml version="1.0" encoding="utf-8"?> 지정 미치 UTF-8로 저장

 

 

빌드 자동화 실습

    1. SVN Checkout : D:\test\svn_client\trunk\console

    2. C:\Program Files\CruiseControl.NET\server\ccnet.config 수정

<cruisecontrol xmlns:cb="urn:ccnet.config.builder">

    <project name="consoleProject">

        <labeller type="defaultlabeller">

            <prefix>1.0.</prefix>

        </labeller>

        

        <sourcecontrol type="svn">

            <trunkUrl>svn://127.0.0.1:3690/svn/trunk/console</trunkUrl>

            <workingDirectory>D:\test\svn_client\trunk\console</workingDirectory>

        </sourcecontrol>

        

        <triggers>

            <scheduleTrigger time="20:00" buildCondition="ForceBuild" name="Scheduled" />

        </triggers>

        

        <tasks>

            <devenv>

                <solutionfile>D:\test\svn_client\trunk\console\console.sln</solutionfile>

                <configuration>Release</configuration>

            </devenv>

        </tasks>

    </project>

</cruisecontrol>

 

    3. C:\Program Files\CruiseControl.NET\server\ccnet.exe 실행

    4. C:\Program Files\CCTray\cctray.exe 실행

        "File > Settings.. > Build Projects" 에서 "Add..." > "Add Server" 에서 서버 추가 후 "Available Projects" 선택

    5. CCTray기능 사용

Force Build 버튼으로 강제 빌드 명령 가능

webdashboard 연결

 

 

Webdashboard가 정상적으로 나오지 않을 경우.

    Windows Vista, Windows7 이나 IIS 7 에선 설정방법 변경으로 CruisControl.NET 설치시

webdashboard가 정상적 설정되지 않습니다.

 

    다음 부분을 확인하고 설정해줘야 하며 windows 7, IIS 7.5 기준의 설명입니다.

 

    1. ASP.NET(.NET Framework 2.0 이상) 설치 확인

        설치가 안되어있다면 다음 주소에서 다운받아 설치

        http://www.microsoft.com/downloads/ko-kr/details.aspx?displaylang=ko&familyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5

 

    2. IIS에서 ASP.NET 사용 설정

        "제어판 > 프로그램 제거 또는 변경 > Windows 기능 사용/사용 안함" 에서

        "인터넷 정보 서비스 > World Wide Web 서비스 > 응용 프로그램 개발 기능" 에서 ASP.NET 체크

        (Windows XP에선 "C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i" 를 통해 등록할 수 있습니다.

        Windows7에선 저 명령을 안써봐서 모르겠습니다.)

    3. "관리 도구 > IIS(인터넷 정보 서비스) 관리자" 설정

        "Default Web Site" 오른쪽 마우스 메뉴에서 "응용 프로그램 추가"

별칭 : ccnet

응용 프로그램 풀 : DefaultAppPool

실제 경로 : C:\Program Files\CruiseControl.NET\webdashboard

        **. 잘 안될 경우 " Classic .NET AppPool " 라는 이름으로 응용 프로그램 풀을 만들어 지정해 주어야 할 것 같습니다.

        IIS 재시작를 재시작 합니다.

    4. C:\Program Files\CruiseControl.NET\webdashboard\Web.config 파일 설정 확인

        다음 설정이 들어있는지 확인합니다. (CruiseControl.NET-1.6.7981.1-Setup.exe 버전엔 자동으로 설정되어있습니다.)

 

<!-- Enable the handles in IIS 7.0 or later-->

<system.webServer>

<validation validateIntegratedModeConfiguration="false" />

<handlers>

<add verb="*" path="*.aspx" type="ThoughtWorks.CruiseControl.WebDashboard.MVC.ASPNET.HttpHandler,ThoughtWorks.CruiseControl.WebDashboard" name="CCNetHttpHandler"/>

<add verb="*" path="*.xml" type="ThoughtWorks.CruiseControl.WebDashboard.MVC.ASPNET.HttpHandler,ThoughtWorks.CruiseControl.WebDashboard" name="CCNetXmlHandler"/>

</handlers>

</system.webServer>

 

참고 : 빌드서버 구축 - 2008 Server Core + CruiseControl.NET + SVN 설치, 셋팅 http://talsu.net/133

 

 

Apache와 Subversion 연동

    Trac과 Subversion의 연동을 위해 http://, https:// 의 사용을 위해 Apache 설치합니다.

    svn:// 방식은 passwd 파일로 계정 정보를 관리하기 때문에 Trac과 계정정보를 공유하지 못하기 때문입니다.

 

    설치 및 설정

        Apache : http://apache.org/

        1. http://mirror.khlug.org/apache//httpd/binaries/win32/httpd-2.2.17-win32-x86-openssl-0.9.8o.msi 를 다운로드

        2. 일단 apache와 IIS의 충돌을 피하기 위해 IIS는 중지합니다. (cmd> net stop http)

        3. Next로 기본 설치 진행

        4. http://localhost/ 접속하여 "It works!" 확인

        5. Apache와 IIS 의 80 port 충돌 해결 - 설정 변경

            1. IIS에서 80을 8000으로 포트 변경

            2. ccnet.config에 프로젝트안에 <webURL> 설정을 통해 port 지정

<cruisecontrol xmlns:cb="urn:ccnet.config.builder">

    <project name="consoleProject">

        <webURL>http://localhost:8000/ccnet</webURL>

        <labeller type="defaultlabeller">

            <prefix>1.0.</prefix>

        </labeller>

...

 

        5. Apache와 IIS 의 80 port 충돌 해결 - WindowsServer2003-KB892777-SupportTools-x86-ENU.exe 설치

            Apache와 IIS가 동시에 80 port를 사용할 수 있게 하는 방법입니다.

            1. WindowsServer2003-KB892777-SupportTools-x86-ENU.exe 다운로드 및 설치

            http://www.microsoft.com/downloads/en/details.aspx?familyid=6EC50B78-8BE1-4E81-B3BE-4E7AC4F0912D&displaylang=en

            2. "시작 > Windows Support Tools > Command Prompt" 실행하여 다음 명령 실행

                cmd> httpcfg.exe set iplisten -i 192.168.1.100

                (192.168.1.100은 로컬 컴퓨터 IP 주소. http://support.microsoft.com/kb/813368/ko 참고)

            3. Tip

                iplisten에 등록된 ip 조회    : cmd> httpcfg query iplisten

                iplisten에 등록된 ip 삭제    : cmd> httpcfg delete iplisten -i 192.168.1.100

                설정 적용(IIS 재시작)        : cmd> net stop http, net start http

 

        6. Subversion 설치 버전

            Apache와 연동을 위해선 Apache 2.2용 Subversion이 설치되어있어야 합니다.

 

        7-1. C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf 파일 수정

            #주석 제거

            LoadModule dav_module modules/mod_dav.so

            #추가

LoadModule dav_svn_module "C:\Program Files\Subversion\bin\mod_dav_svn.so"

LoadModule authz_svn_module "C:\Program Files\Subversion\bin\mod_authz_svn.so"

 

            (경로가 잘못된 경우 Apache 시작시 "The requested operation has failed!" 에러 발생)

        7-2. Apache 재시작

            정상설치시 "Apache Service Monitor"에서 Stop > Start 로 재시작 하면

            상태바에 "Apache/2.2.17 (Win32) SVN/1.6.6 DAV/2" 가 표시 됩니다.

 

    Apache, Subversion 연동 설정

        Apache를 통한 Subversion 계정 설정

            1. htpasswd 파일 을 저장할 폴더 생성 (C:\repos)

C:\>mkdir repos

C:\>cd repos

            2. 사용자 추가

첫번째 사용자 추가 (-c는 처음 htpasswd 파일 생성시에만 사용)

C:\repos>"c:\Program Files\Apache Software Foundation\Apache2.2\bin\htpasswd.exe" -c htpasswd sampleuser

Automatically using MD5 format.

New password: **********

Re-type new password: **********

Adding password for user sampleuser

 

                두번째 사용자 추가 (이미 htpasswd 파일은 생성되어있으니 -c 옵션을 제외하고 htpassswd.exe 실행

C:\repos>"c:\Program Files\Apache Software Foundation\Apache2.2\bin\htpasswd.exe" htpasswd sampleuser2

Automatically using MD5 format.

New password: ***********

Re-type new password: ***********

Adding password for user sampleuser2

 

            3. 사용자 권한 설정 : C:\repos\authz 파일 생성 후 권한 설정

                Ex) sample 저장소의 최상위 디렉 토리에 대해 모든 사용자(*)는 접근 불가

                [sample:/]

                sampleuser = rw

                sampleuser2 = rw

                * =

 

        http 연결 설정

웹으로 svn 읽기만 가능하며 svn.exe, TortoiseSVN으로 쓰기 가능

            1. httpd.conf에 다음 추가

NameVirtualHost *:80

<VirtualHost *:80>

    <Location /svn>

        DAV svn

        #저장소 부모 디렉토리

        SVNParentPath "D:\test"

        #계정 권한 파일

        AuthzSVNAccessFile "C:\repos\authz"

        #Basic : htpasswd 파일 사용

        AuthType Basic

        #Subversion 클라이언트 접속시 표시될 저장소 이름

        AuthName "Subversion Repository"

        #계정 정보 파일

        AuthUserFile "C:\repos\htpasswd"

        #로그인한 사용자만 접속 허용

        Require valid-user

        #웹으로 아무나 CheckOut할수 있게 하고 로그인한 사용자만 Commit 허용시 설정

        #<LimitExcept GET PROPFIND OPTIONS REPORT>

        #    Require valid-user

        #</LimitExcept>

    </Location>

</VirtualHost>

            2. Apache 재시작

                Apache 재시작 후 http://localhost/svn/레파지토리이름/ 로 접속하여 확인합니다. (http://localhost/svn/svn/)

                svnserve.exe는 종료해도 됩니다.

 

        https 연결 설정

            openssl 버전의 Apache에서 설정할 수 있습니다.

            1. 암호화에 사용할 인증서 생성 (example.csr, privkey.pem 파일 생성)

c:\>cd "c:\Program Files\Apache Software Foundation\Apache2.2\bin"

c:\Program Files\Apache Software Foundation\Apache2.2\bin>openssl.exe

OpenSSL> req -config ..\conf\openssl.cnf -new -out example.csr

Loading 'screen' into random state - done

Generating a 1024 bit RSA private key

.++++++

.......++++++

writing new private key to 'privkey.pem'

Enter PEM pass phrase:                            #개인키에서 사용할 암호

Verifying - Enter PEM pass phrase:                        #개인키에서 사용할 암호

-----

You are about to be asked to enter information that will be incorporated

into your certificate request.

What you are about to enter is what is called a Distinguished Name or a DN.

There are quite a few fields but you can leave some blank

For some fields there will be a default value,

If you enter '.', the field will be left blank.

-----

Country Name (2 letter code) [AU]:KO                        #국가명

State or Province Name (full name) [Some-State]:                #Enter

Locality Name (eg, city) []:seoul                        #지역명

Organization Name (eg, company) [Internet Widgits Pty Ltd]:yamoe        #단체명

Organizational Unit Name (eg, section) []:YAMOE.local                #Apache 설치시 도메인명

Common Name (eg, YOUR name) []:YAMOE.local                #Apache 설치시 도메인명

Email Address []:test@gmail.com                        #E-mail

 

Please enter the following 'extra' attributes

to be sent with your certificate request

A challenge password []:                            #Enter

An optional company name []:                            #Enter

OpenSSL> exit

 

            2. Apache에서 사용할 공개키 생성 (유효기간 1년. example.key, example.crt 파일 생성)

c:\Program Files\Apache Software Foundation\Apache2.2\bin>openssl.exe

OpenSSL> rsa -in privkey.pem -out example.key

Enter pass phrase for privkey.pem:            #암호 입력

writing RSA key

OpenSSL> req -config ..\conf\openssl.cnf -new -x509 -days 365 -key example.key -out example.crt

Loading 'screen' into random state - done

You are about to be asked to enter information that will be incorporated

into your certificate request.

What you are about to enter is what is called a Distinguished Name or a DN.

There are quite a few fields but you can leave some blank

For some fields there will be a default value,

If you enter '.', the field will be left blank.

-----

Country Name (2 letter code) [AU]:KO                    #국가명

State or Province Name (full name) [Some-State]:            #Enter

Locality Name (eg, city) []:seoul                    #지역명

Organization Name (eg, company) [Internet Widgits Pty Ltd]:yamoe    #단체명

Organizational Unit Name (eg, section) []:YAMOE.local            #Apache 설치시 도메인명

Common Name (eg, YOUR name) []:YAMOE.local            #Apache 설치시 도메인명

Email Address []:test@gmail.com                    #E-mail

OpenSSL> exit

 

            3. privkey.pem, example.csr, example.key, example.crt 파일을

C:\Program Files\Apache Software Foundation\Apache2.2\conf 로 이동

            4. httpd.conf 수정

                #Listen 80 아래에 Listen 443 (https 포트) 추가

                Listen 443

                #주석 제거

                LoadModule ssl_module modules/mod_ssl.so

                #주석 제거

                Include conf/extra/httpd-ssl.conf

            5. httpd.conf 추가

 

NameVirtualHost *:443

<VirtualHost *:443>

    SSLEngine on

    SSLCertificateFile "C:\Program Files\Apache Software Foundation\Apache2.2\conf\example.crt"

    SSLCertificateKeyFile "C:\Program Files\Apache Software Foundation\Apache2.2\conf\example.key"

    SSLProtocol all

    SSLCipherSuite HIGH:MEDIUM

    

    <Location /svn>

        DAV svn

        #저장소 부모 디렉토리

        SVNParentPath "D:\test"

        #계정 권한 파일

        AuthzSVNAccessFile "C:\repos\authz"

        #Basic : htpasswd 파일 사용

        AuthType Basic

        #Subversion 클라이언트 접속시 표시될 저장소 이름

        AuthName "Subversion Repository"

        #계정 정보 파일

        AuthUserFile "C:\repos\htpasswd"

        #로그인한 사용자만 접속 허용

        Require valid-user

        #웹으로 아무나 CheckOut할수 있게 하고 로그인한 사용자만 Commit 허용시 설정

        #<LimitExcept GET PROPFIND OPTIONS REPORT>

        #    Require valid-user

        #</LimitExcept>

    </Location>

</VirtualHost>

 

            6. Apache 재시작

                Apache 재시작 후 https://localhost/svn/레파지토리이름/ 로 접속하여 확인합니다. (https://localhost/svn/svn/)

                svnserve.exe는 종료해도 됩니다.

 

 

Trac

설치

    0. 준비 사항

        크게 보면 Trac 0.12, subversion 1.6.6, Apache 2.2.17, python 2.6을 사용할 계획입니다.

        전제상황1. subversion

http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=11151&expandFolder=11151&folderID=91 에서

apache2.2 이상 지원 하는 Setup-Subversion-1.6.6.msi를 설치.

다운로드한 파일 : 01.Setup-Subversion-1.6.6.msi

        전제상황2. Apache

            http://mirror.khlug.org/apache//httpd/binaries/win32/httpd-2.2.17-win32-x86-openssl-0.9.8o.msi 설치

            다운로드한 파일 : 02.httpd-2.2.17-win32-x86-openssl-0.9.8o.msi

        전제상황3. subversion과 Apache는 연동설정 완료 상태

 

        Trac을 위해 설치할 프로그램간의 호환성 때문에 무조건 최신을 설치하면 안됩니다.

         보통 python 지원 버전을 중심으로 결정하면 될 것 같고 2011년 2월 말 현재 Python 2.6이 모두 호환되는 상태로 보입니다.

        각 프로그램의 python 지원 버전(2011-02-20 기준)

python        : 1.5 ~ 3.2 존재

svn-python    : py 2.5 ~ 2.6 지원

Genshi        : py 2.5 ~ 2.7 지원

setuptools    : py 모든 버전 지원

mod_python    : py 2.5 지원

modwsgi    : py 2.6 ~ 2.7 지원

pysqlite    : py 2.5 ~ 2.6 지원

pygments    : py 2.4 ~ 2.7 지원

Trac        : py 2.4 ~ 2.7 지원

        Trac 설치를 위한 자세한 내용은 Trac Installation Guide for 0.12(http://trac.edgewall.org/wiki/TracInstall) 참조

 

    1. Python (http://python.org/)

Trac이 Python으로 작성되어있기 때문에 설치.

http://python.org/download/releases/2.6.6/ 에서 python-2.6.6.msi 다운로드 및 설치

        다운로드한 파일 : 03.python-2.6.6.msi

    2. svn-python

Trac이 Python기반이기 때문에 Trac과 Subversion 연동을 위해 설치

http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=11151&expandFolder=11151&folderID=91 에서

svn-python-1.6.6.win32-py2.6.exe 다운로드 및 설치

다운로드한 파일 : 04.svn-python-1.6.6.win32-py2.6.exe

        환경 변수 추가 : PATH = C:\Python26\

 

    3. setuptools (http://peak.telecommunity.com/DevCenter/setuptools)

        Python 프로그램들을 웹으로 자동 설치해주는 툴이며 Trac 실행시 반드시 필요합니다.

        

1) 인터넷 설치

    ez_setup.py 다운로드 : http://peak.telecommunity.com/dist/ez_setup.py

C:\ >python.exe ez_setup.py

        2) 수동 설치

http://pypi.python.org/pypi/setuptools#downloads 에서 setuptools-0.6c11.win32-py2.6.exe 로 설치

다운로드한 파일 : 05.setuptools-0.6c11.win32-py2.6.exe

        3) 환경 변수 추가 : PATH = C:\Python26\Scripts

 

        이후 easy_install 명령으로 인터넷 설치 혹은 .egg 파일로 로컬 설치 가능합니다.

 

    4. Genshi (http://genshi.edgewall.org/)

        Velocity 와 같은 템플릿 엔진으로 Python을 지원하며 Trac 0.11부터 Clearsilver에서 Censhi로 변경됨.

        http://genshi.edgewall.org/wiki/Download

        1) 인터넷 설치 : C:\> easy_install Genshi

        2) 수동 설치 : Trac 0.12는 Genshi 0.6 이상이 필요하므로 Genshi-0.6.win32.exe 설치

            다운로드한 파일 : 06.Genshi-0.6.win32.exe

 

    5. modwsgi (http://code.google.com/p/modwsgi/)

        Apache에서 Trac을 CGI 방식으로 실행하면 느리므로 Python으로 빠르게 실행하기 위해 설치합니다.

        mod_python(http://www.modpython.org/) 는 Trac에서 deprecated 됨.

 

        1) http://code.google.com/p/modwsgi/wiki/DownloadTheSoftware?tm=2 에서 mod_wsgi-win32-ap22py26-3.3.so 다운로드

            다운로드한 파일 : 07.mod_wsgi-win32-ap22py26-3.3.so

        2) mod_wsgi-win32-ap22py26-3.3.so 파일을 C:\Program Files\Apache Software Foundation\Apache2.2\modules 에 카피 및 파일을 다룰 수 있는 적절한 권한 설정

        3) C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf 에 다음 추가

            LoadModule wsgi_module modules/mod_wsgi-win32-ap22py26-3.3.so

        4) Apache 재시작

 

설치 방법 참조 : http://code.google.com/p/modwsgi/wiki/InstallationOnWindows

 

    6. pysqlite (http://trac.edgewall.org/wiki/PySqlite)

        Python에서 sqllite 연동지원 라이브러리

        http://code.google.com/p/pysqlite/downloads/list 에서 pysqlite-2.6.0.win32-py2.6.exe 다운로드 및 설치

        다운로드한 파일 : 08.pysqlite-2.6.0.win32-py2.6.exe

 

    7. Pygments (http://pygments.org/)

        소스 코드에 컬러 표시를 해주는 프로그램

        enscript(http://trac.edgewall.org/wiki/PySqlite) 는 Trac에서 deprecated됨

        1. 인터넷 설치 방법

            C:\> easy_install Pygments

        2. 수동 설치 방법

            http://pypi.python.org/pypi/Pygments 에서 Pygments-1.4-py2.6.egg 다운로드

            다운로드한 파일 : 09.Pygments-1.4-py2.6.egg

            C:\> easy_install Pygments-1.4-py2.6.egg

 

    8. Trac (http://trac.edgewall.org/)

        http://trac.edgewall.org/wiki/TracDownload 에서 Trac-0.12.2.win32.exe 다운로드 및 설치

        다운로드한 파일 : 10.Trac-0.12.2.win32.exe

 

Trac 및 관련 기본 설정

0. D:\trac, D:\trac\projects, D\trac\eggs 폴더 생성

1. Trac 프로젝트 생성

D:\>c:\Python26\Scripts\trac-admin.exe d:\trac\projects\example initenv

Project Name [My Project]> example                        #프로젝트 이름

Database connection string [sqlite:db/trac.db]>                #Entjer : 기본값 사용

 

2. Trac과 mod_wsgi 설정

    1) D:\trac\Python\eggs 폴더 생성

    2) D:\trac\example\trac.wsgi 생성후 다음을 작성

        **주의. 윈도우의 경우는 디렉토리 경로를 / 혹은 \\ 로 해야 한다. /로 하면 페이지 띄울때 에러 발생

import os

 

# set case : several trac project

os.environ['TRAC_ENV_PARENT_DIR'] = 'D:/trac/projects'

 

# set case : only one trac project

#os.environ['TRAC_ENV'] = 'D:/trac/projects/example'    

os.environ['PYTHON_EGG_CACHE'] = 'D:/trac/eggs'

 

import trac.web.main

application = trac.web.main.dispatch_request

 

3. Apache http, https연결 설정 (BOLD 체 부분 추가)

 

NameVirtualHost *:80

<VirtualHost *:80>

    <Location /svn>

        DAV svn

        SVNParentPath "D:\test"

        AuthzSVNAccessFile "C:\repos\authz"

        AuthType Basic

        AuthName "Subversion Repository"

        AuthUserFile "C:\repos\htpasswd"

        Require valid-user

    </Location>

    

    WSGIScriptAlias /trac "D:\trac\projects\trac.wsgi"

 

    <Directory D:\trac\projects\>

        WSGIApplicationGroup %{GLOBAL}

        Order deny,allow

        Allow from all

    </Directory>

 

    #single project시 사용

    #<Location "/trac/example/login">

    #    AuthType Basic

    #    AuthName "Trac"

    #    AuthUserFile "C:\repos\htpasswd"

    #    Require valid-user

    #</Location>

    

    #multiple project시 사용

    <LocationMatch "/trac/[^/]+/login">    

        AuthType Basic

        AuthName "Trac"

        AuthUserFile "C:\repos\htpasswd"

        Require valid-user

    </LocationMatch>

</VirtualHost>

 

 

NameVirtualHost *:443

<VirtualHost *:443>

    SSLEngine on

    SSLCertificateFile "C:\Program Files\Apache Software Foundation\Apache2.2\conf\example.crt"

    SSLCertificateKeyFile "C:\Program Files\Apache Software Foundation\Apache2.2\conf\example.key"

    SSLProtocol all

    SSLCipherSuite HIGH:MEDIUM

    

    <Location /svn>

        DAV svn

        SVNParentPath "D:\test"

        AuthzSVNAccessFile "C:\repos\authz"

        AuthType Basic

        AuthName "Subversion Repository"

        AuthUserFile "C:\repos\htpasswd"

        <LimitExcept GET PROPFIND OPTIONS REPORT>

            Require valid-user

        </LimitExcept>

    </Location>

 

    WSGIScriptAlias /trac "D:\trac\projects\trac.wsgi"

 

    <Directory D:\trac\projects\>

        WSGIApplicationGroup %{GLOBAL}

        Order deny,allow

        Allow from all

    </Directory>

 

    #single project시 사용

    #<Location "/trac/example/login">

    #    AuthType Basic

    #    AuthName "Trac"

    #    AuthUserFile "C:\repos\htpasswd"

    #    Require valid-user

    #</Location>

    

    #multiple project시 사용

    <LocationMatch "/trac/[^/]+/login">    

        AuthType Basic

        AuthName "Trac"

        AuthUserFile "C:\repos\htpasswd"

        Require valid-user

    </LocationMatch>

</VirtualHost>

 

4. 접속 테스트

http://localhost/trac

    https://localhost/trac

 

5. Trac 계정 추가

    admin 이란 ID로 추가

    C:\>"C:\Program Files\Apache Software Foundation\Apache2.2\bin\htpasswd.exe" C:\repos\htpasswd admin

 

6. Trac 관지자 지정

    example 프로젝트에 대해 admin 계정을 관리자로 추가

    C:\> C:\Python26\Scripts\trac-admin.exe D:\trac\projects\example permission add admin TRAC_ADMIN

 

7. Trac, Subversion 연동 설정

    Trac 프로젝트 생성시 svn 저장소를 묻지 않는다면 수동으로 설정합니다.

    D:\trac\projects\example\conf\trac.ini 파일 수정

        authz_file = c:\repo\authz            #권한 설정 파일 지정

authz_module_name = svn            #svn 프로젝트명 지정

        default_charset = iso-8859-15            #파일 인코딩 설정. (UTF-8, cp949 ..)

        repository_dir = D:\test\svn            #svn 서버 저장소 지정

 

        src = site/your_project_logo.png        #로고 이미지. C:\Python25\Lib\site-packages\trac\htdocs 에 이미지 파일 저장

 

 

Trac 플러그인 설치 및 설정

http://trac-hacks.org/

 

[IniAdminPlugin]    http://trac-hacks.org/wiki/IniAdminPlugin

    trac 각 프로젝트의 설정파일인 conf/trac.ini 을 trac의 admin 페이지에서 편집할 수 있도록 해주는 플러그인

    다운로드한 파일 : 10_01.iniadminplugin_0.11-r9908.zip

    설치 :

        1. 압축해제 후 setup.py 실행

            > python setup.py install

        2. 아파치 재시작

        3. trac admin 유저로 로그인 후 "admin > General > Plugins" 에서 iniadmin 0.2를 Enable 시킴

 

[Account Manager Plugin]    http://trac-hacks.org/wiki/AccountManagerPlugin

    trac 계정 생성시 htpasswd.exe 대신 admin 메뉴에서 할 수 있도록 해주는 플러그인

    다운로드한 파일 : 10_02.accountmanagerplugin_0.11-r9908.zip

    설치 :

        1. 압축해제 후 setup.py 실행

            > python setup.py install

        2. 아파치 재시작

        3. trac admin 유저로 로그인 후 "admin > General > Plugins" 에서 tracaccountmanager 0.2.1 dev 중 다음 항목을 Enable 시킴

            AccountManagerAdminPage, AccountManager, HtPasswdStore, AccountModule, LoginModule, RegistrationModule

        4. "admin > Accounts > Configuration" 에 HtPasswdStore에서 1선택, filename에서 "C:\repos\htpasswd" 입력

        5. "admin > Accounts > Users" 에서 사용자 관리 가능

 

    LoginModule 사용을 위한 추가 설정

        1. trac.ini 파일의 [components] 부분 수정/추가

            acct_mgr.web_ui.loginmodule = enabled

            trac.web.auth.loginmodule = disabled

        2. httpd.conf 의 <LocationMatch> 부분에 Require valid-user 주석처리

            <LocationMatch "/trac/[^/]+/login">    

                AuthType Basic

                AuthName "Trac"

                AuthUserFile "C:\repos\htpasswd"

                #Require valid-user

            </LocationMatch>

        3. Apache 재시작 후 trac 로그인이 창이 아닌 웹페이지로 나옴을 확인

 

Trac Admin 페이지 기본 설정

    "admin > trac.ini > trac" 기본 설정

        authz_file        : authz 파일 경로. Ex) C:|repos\authz

        authz_module_name    : 현재 저장소 이름 지정.

        default_charset    : 소스코드 한글이 깨지지 않도록 cp949 지정. (iso-8859-15, cp949, utf-8)

    

    "admin > trac.ini > mimeviewer" 기본 설정

        enscript_path        : 소스 하이라이팅을 위한 설정.

 

    "admin > trac.ini > header_logo" 기본 설정

        src            : 이미지 파일 경로

 

Subversion Hook Script

    Trac과 연동시 사용

    hook script는 svn 저장소의 hooks 디렉토리에 .tmpl 파일들이 있으며 윈도우에서 사용하려면 .bat이나 .cmd 파일로 변경해야 합니다.

    그 외 perl을 사용하므로 ActivePerl이 설치되어 있어야 합니다.

 

    [hook script 종류]

        start-commit    : 커밋 트랜잭션 생성 전. userid 별로 커밋 권한 지정 가능.

        pre-commit    : 커밋 트랜잭션 생성 후. 커밋 메시지 미입력시 커밋 제한 가능.

        post-commit    : 커밋 완료 후. 커밋 로그를 메일/Trac 에 전송 가능.

        pre-revprop-change    : 속성 수정 전. 로그 메시지 수정 가능.

        post-revprop-change    : 속성 수정 후. 속성 수정 결과 메일 전송 가능.

        pre-lock    : 잠금 실행 전. userid 별 잠금 권한 제어 가능.

        post-lock    : 잠금 실행 후. 잠금 결과 메일 전송 가능.

        pre-unlock    : 잠금 해제 전. userid 별 잠금 해제 제어 가능.

        post-unlock    : 잠금 해제 후. 잠금 해제 결과 메일 전송 가능.

 

    [Hook script로 커밋시 로그메시지와 수정사항 메일 전송]

        - IIS SMTP 사용 방법

            1. IIS SMTP 서버 설치 및 설정 : Windows 7 에선 SMTP 사용 불가능하여 오픈된 SMTP 사용하는 것으로 보임.

            2. commit-email.pl (메일 전송 스크립트 파일)

                commit-email.pl 파일 다운로드 : http://pyrasis.com/repos/subversion-tools/hook-scripts/commit-email.pl?view=co

                D:\test\tools 에 위치시킨 후 다음 부분 수정

# Svnlook path.

#my $svnlook = "@SVN_BINDIR@/svnlook";

my $svnlook = "C:\\Program Files\\Subversion\\bin\\svnlook.exe";

            3. svn 저장소 hooks 디렉토리에 post-commit.cmd 작성

@ECHO OFF

REM POST-COMMIT HOOK

 

SET REPOS=%1

SET REV=%2

 

SET PROJECT=example

SET HOSTNAME=example.com

SET EMAIL=test@gmail.com

SET ENC=euc-kr

 

SET TOOLS_DIR="D:\test\tools"

 

%TOOLS_DIR%\commit-email.pl %REPOS% %REV% -e %ENC% -h %HOSTNAME% -s %PROJECT% %EMAIL%

            4. 테스트 : 리비전 55에 대한 커밋 로그 메시지 전송

                D:\test\svn\hooks>post-commit.cmd d:\test\svn 55

 

        - mailer.py 사용 방법 (Gmail 혹은 IIS SMTP 가능)

            mailer.py, mailer.conf.example 파일 사용. (svn 소스의 tools/hook-scripts에 있는 파일에 한글 및 윈도우 지원 처리됨)

            1. diffutils-2.8.7-1.exe 설치 : http://gnuwin32.sourceforge.net/packages/diffutils.htm

                mailer.py는 diff가 필요하기 때문에 diffutils-2.8.7-1.exe 설치 및 환경변수 등록

                PATH = C:\Program Files\GnuWin32\bin

                OS Reboot 필요

            2. mailer.py, mailer.conf 복사 및 수정

                D:\test\tools 폴더에 mailer.py와 mailer.conf(.example 제거) 복사

 

                - IIS SMTP 이용시 설정

                    # mailer.conf 파일

                    smtp_hostname = localhost

                - Gmail 이용시

                    # mailer.conf 파일

                    smtp_hostname = smtp.gmail.com:587

smtp_username = 이메일 주소

smtp_password = 이메일 암호

 

                    #diff = /usr/bin/diff -u -L %(label_from)s -L %(label_to)s %(from)s %(to)s

                    diff = diff.exe -u -L %(label_from)s -L %(label_to)s %(from)s %(to)s

                    from_addr = invalid@example.com

                    to_addr = svn 로그메세지를 받을 이메일 주소

 

                    # mailer.py 파일

                    if self.cfg.is_set('general.smtp_username'):

                     server.ehlo() # for GMail

                     server.starttls() # for GMail

                     server.ehlo() # for GMail

                     server.login(self.cfg.general.smtp_username,

                     self.cfg.general.smtp_password)

                     server.sendmail(self.from_addr, self.to_addrs, self.buffer.getvalue())

                     server.quit()

                     server.close() # server.quit() to server.close()

 

            3. svn 저장소 hooks 디렉토리에 post-commit.cmd 작성

@ECHO OFF

REM POST-COMMIT HOOK

 

SET REPOS=%1

SET REV=%2

 

SET TOOLS_DIR="D:\test\tools"

%TOOLS_DIR%\mailer.py commit %REPOS% %REV% %TOOLS_DIR%\mailer.conf

 

            4. 테스트 : 리비전 55에 대한 커밋 로그 메시지 전송

                D:\test\svn\hooks>post-commit.cmd d:\test\svn 55

 

    [Hook script로 로그 메시지 수정시 메일 전송]

        1. sed-4.2.1-setup.exe 설치

            http://gnuwin32.sourceforge.net/packages/sed.htm

            환경변수 등록 : PATH=C:\Program Files\GnuWin32\bin

 

        2. pre-revprop-change.cmd, post-revprop-change.cmd

            D:\test\svn\hooks에 카피후 수정

            pre-revprop-change.cmd    : 수정사항 없음.

            post-revprop-change.cmd    :

                

 

SET REPOS=%1

SET REV=%2

SET USER=%3

SET PROPNAME=%4

SET ACTION=%5

 

SET PROJECT=svn

SET HOSTNAME=sample.com

SET EMAIL=source-changes@sample-mail.com

 

SET TOOLS_DIR="D:\test\tools"

SET SVN_DIR=C:\Program Files\Subversion

 

SET SVNLOOK="%SVN_DIR%\bin\svnlook.exe"

 

%SVNLOOK% propget --revprop -r %REV% %REPOS% %PROPNAME% > %TEMP%\newrevprop.tmp

diff -u %TEMP%\oldrevprop.tmp %TEMP%\newrevprop.tmp | sed -e "s/^---.*$/--- old property value/" -e "s/^+++.*$/+++ new property value/" -e "/^\\.*$/d" > %TEMP%\revprop.diff

 

REM %TOOLS_DIR%\commit-email.pl --revprop-change -d %TEMP%\revprop.diff %REPOS% %REV% %USER% %PROPNAME% -h %HOSTNAME% -s %PROJECT% %EMAIL%

%TOOLS_DIR%\mailer.py propchange %REPOS% %REV% %USER% %PROPNAME% %TOOLS_DIR%\mailer.conf

 

DEL %TEMP%\oldrevprop.tmp

DEL %TEMP%\newrevprop.tmp

DEL %TEMP%\revprop.diff

 

        3. 테스트

            tortoiseSVN 에서 로그 수정시 메일 발송 확인

 

 

    [커밋시 로그 메시지로 특정 티켓 연동]

        커밋 로그에 티켓 번호를 지정하면 티켓에 커밋 로그 메시지가 답글로 달림.

        (옵션) 로그 메시지에 티켓 번호 미지정시, 혹은 티켓이 닫혀있는 경우 커밋 불가 처리 가능

 

        1. trac-post-commit-hook

커밋 로그 메시지를 티켓에 답글로 달 수 있도록 해줌

            D:\test\tools에 해당 파일 복사

        2. svn 저장소의 hooks\post-commit.cmd 에 다음 추가

SET REPOS=%1

SET REV=%2

 

SET PROJECT=example

SET HOSTNAME=example.com

SET EMAIL=source-changes@sample-mail.com

SET ENC=euc-kr

 

SET TOOLS_DIR="D:\test\tools"

SET PYTHON_DIR=C:\Python26

SET TRAC_ENV=D:\trac\projects\%PROJECT%

SET PYTHON="%PYTHON_DIR%\python.exe"

%PYTHON% "%TOOLS_DIR%\trac-post-commit-hook" -p "%TRAC_ENV%" -r "%REV%"

 

REM%TOOLS_DIR%\commit-email.pl %REPOS% %REV% -e %ENC% -h %HOSTNAME% -s %PROJECT% %EMAIL%

%TOOLS_DIR%\mailer.py commit %REPOS% %REV% %TOOLS_DIR%\mailer.conf

 

        3. trac 접속 후 New Ticket 클릭 하여 티켓 등록

        4. svn의 아무 파일이나 수정후 커밋 메시지에 "re #1. 수정했습니다." 입력후 커밋 수행

            # 으로 티켓번호 지정

            re    : refs, see, references, addresses 와 동일하며 답글을 단다는 의미

            close, closed, closes, fix, fixed, fixes : 티켓에 답글 단후 티켓 종료

 

    [커밋시 티켓 연동하여 제약하기]

        커밋 로그 메시지 내용에 티켓 번호/명령 포함 여부와 티켓이 open 상태인지 검사하여 커밋 허용/불허 기능

        1. trac-pre-commit-hook

            D:\test\tools에 해당 파일 복사

            인터넷에서 원본을 구해 사용한다면 다음 부분 추가

def main():

if len(sys.argv) != 3:

print >> sys.stderr, 'Usage: %s <trac_project> <log_message>' % sys.argv[0]

sys.exit(1)

 

env_path = sys.argv[1]

if not os.path.exists(sys.argv[2]):

print >> sys.stderr , 'Log file not found.'

sys.exit(1)

f = open(sys.argv[2], 'r')

log = f.read()

f.close()

 

        2. svn 저장소의 hooks\pre-commit.cmd 작성

 

SET REPOS=%1

SET TXN=%2

 

SET PROJECT=example

 

SET TOOLS_DIR=D:\test\tools

SET SVN_DIR=C:\Program Files\Subversion

SET PYTHON_DIR=C:\Python26

SET TRAC_ENV=D:\trac\projects\%PROJECT%

 

SET PYTHON="%PYTHON_DIR%\python.exe"

SET SVNLOOK="%SVN_DIR%\bin\svnlook.exe"

SET LOG_FILE=%TEMP%\svnlog-%TXN%

 

%SVNLOOK% log -t %TXN% %REPOS% > %LOG_FILE%

 

%PYTHON% %TOOLS_DIR%\trac-pre-commit-hook %TRAC_ENV% %LOG_FILE%

 

IF ERRORLEVEL 1 SET TRAC_CANCEL=YES

DEL %LOG_FILE%

IF DEFINED TRAC_CANCEL GOTO :ERROR

::

::-----------------------------

 

:SUCCESS

EXIT 0

 

:ERROR

EXIT 1

 

        3. svn의 아무 파일이나 수정후 커밋시 커밋 로그에 티켓 번호/명령이 없거나 티켓이 close 상태면 거부됨

 

 

 

티켓 변경 사항을 이메일로 통보받기

 

"admin > trac.ini > notification" 에서 설정

[IIS SMTP 서버 사용]

    smtp_enabled        : true

    smtp_server        : localhost

    smtp_port        : 25

    smtp_always_cc    : 메일 주소

[Gmail 계정 사용]

    smtp_enabled        : true

    smtp_server        : smtp.gmail.com

    smtp_port        : 587

    smtp_user        : 메일 서버의 계정

    smtp_password    : 메일 서버의 암호

    smtp_always_cc    : 메일 주소

    user_tls        : true

 

Trac 관리 스트립트

편의를 위한 PowerShell 스크립트 예제

create-project.ps1 : 프로젝트 복사 생성 스크립트

svn 저장소 생성, trank,branches,tags 폴더 추가, svn 저장소의hooks에서 .cmd 파일 복사 및 수정

trac 프로젝트/trac.ini 파일 생성 및 수정, trac-admin.exe로 upgrade, resync 명령 실행, admin 계정을 관리자(TRAC_ADMIN)으로 지정

permission.ps1 : 권한 설정 스크립트

    .ps1 파일에 미리 권한이 되어있어 하나의 프로젝트에 반영시 초기 권한 반영시 사용

permission-all.ps1 : 전체 권한 설정 스크립트

    특정 폴더 아래의 모든 trac 프로젝트에 동일한 권한 설정

trac-resync.ps1 : trac 동기화 스트립트

    svn의 로그 메시지 변경시 trac에도 반영하기 위해 주기적으로 resync 명령을 실행하기 위한 스크립트

    "제어판 > 예약된 작업 > 예약 작업 추가" (혹은 관리도구 > 작업 스케쥴러) 를 통해 배치 형태로 주기적으로 실행 (매일 1번 정도..)

    

Trac RSS Reader 사용

    RSS 클라이언트에 trac의 RSS 주소를 넣어 통지받을 수 있도록 합니다.

trac에선 timeline과 browse source > revision log 부분을 RSS로 받을 수 있습니다.

    timeline 메뉴에선 티켓 변동 사항, 커밋 로그, 마일스톤, 위키 변동 사항 등 확인 가능.

 

    [사용 예]

    1. 무료인 SharpReader0970_Setup.exe 다운로드 및 설치 : http://www.sharpreader.net/

    2. RSS가 지원되는 메뉴에서 해당 주소 복사후 sharpreader 의 Address 에 넣고 subscribe 버튼 클릭시 등록됨

    3. https 사용시 C:\windows\system32\drivers\etc\hosts에 인증서와 동일한 도메인 등록후 사용

 

 

CruiseControl.NET 자동 빌드 시스템 구성

1.자동 버전 업데이트 스크립트

2.Trac에 자동 버전 등록

3.Symboll Server, Subversion Symbol Indexing 연동

4.파일 릴리스 연동

 

1. 자동 버전 업데이트 스크립트

프로젝트에 버전 리소스 추가

    - "리소스 탐색기 > Add > Resource > Version" 으로 버전 파일 추가 (초기 버전 1.0.0.1)

    - SVN에 .rc와 resource.h 파일 커밋

    - SVN url을 http 로 변경

    - C:\Program Files\CruiseControl.NET\server\ccnet.config 파일에 <webURL>(Web Dashboard 주소)와 버전 및 svn 주소 설정 확인

<cruisecontrol xmlns:cb="urn:ccnet.config.builder">

    <project name="consoleProject">

        <webURL>http://localhost:8000/ccnet</webURL>

        <labeller type="defaultlabeller">

            <prefix>1.0.0.</prefix>

        </labeller>

        

        <sourcecontrol type="svn">

            <trunkUrl>http://localhost/svn/svn/trunk</trunkUrl>

            <workingDirectory>D:\test\svn_client_http\trunk</workingDirectory>

        </sourcecontrol>

        

        <triggers>

            <scheduleTrigger time="20:00" buildCondition="ForceBuild" name="Scheduled" />

        </triggers>

        

        <tasks>

            <devenv>

                <solutionfile>D:\test\svn_client_http\trunk\console\console.sln</solutionfile>

                <configuration>Release</configuration>

            </devenv>

        </tasks>

    </project>

</cruisecontrol>

 

    - rcversion.ps1, revert.ps1 을 D:\test\tools 에 복사 후 C:\Program Files\CruiseControl.NET\server\ccnet.config 에 등록

        CruiseControl.NET은 빌드 정보를 C:\Program Files\CruiseControl.NET\server\*.state 파일로 저장

        rcversion.ps1은 .state 파일을 읽어 버전 증가 시킴. 최초엔 .state가 없으므로 버전이 0.0.0.0이 되고 그 후 부터 1.0.0.2, 1.0.0.3 .. 으로 증가함.

        메이저/마이저 버전이 올라갈 경우 빌드 스크립트에서 2.0.0. 이나 3.5.1. 과 같이 지정해야 함.

 

        <tasks>

            <!-- 자동 버전 업데이트 스크립트 -->

            <exec>

                <executable>powershell.exe</executable>

                <baseDirectory>D:\test\tools</baseDirectory>

                <buildArgs>D:\test\tools\rcversion.ps1 "console" "D:\test\svn_client_http\trunk\console\console\console.rc"</buildArgs>

            </exec>

            <devenv>

                <solutionfile>D:\test\svn_client_http\trunk\console\console.sln</solutionfile>

                <configuration>Release</configuration>

            </devenv>

 

            <!-- 수정 된 소스 코드를 원래대로 되돌림 -->

            <exec>

                <executable>powershell.exe</executable>

                <baseDirectory>D:\test\tools</baseDirectory>

                <buildArgs>D:\test\tools\revert.ps1 "D:\test\svn_client_http\trunk\console"</buildArgs>

            </exec>

        </tasks>

2.Trac에 자동 버전 등록

        티켓 등록시 버전 선택 가능하며 trac-admin.exe나 admin 메뉴에서 버전 추가 가능.

        이를 자동으로 등록되도록 변경

        tracversion.ps1을 D:\test\tools 에 복사 후 C:\Program Files\CruiseControl.NET\server\ccnet.config 에 등록

        (tracversion.ps1은 경로가 박혀있어 수정 필요)

** powershell 관리자 권한 실행 http://msdn.microsoft.com/en-us/library/ms714415(v=VS.85).aspx

** powershell 인증 권한 풀기 :

    #인증권한 확인

    PS C:\> Get-ExecutionPolicy

    #인증서 없이 실행하도록 변경

PS C:\> Set-ExecutionPolicy Unrestricted

** <sourcecontrol type="svn"> 에 계정 정보 입력

 

**성공한 설정

<cruisecontrol xmlns:cb="urn:ccnet.config.builder">

    <project name="consoleProject">

        <webURL>http://localhost:8000/ccnet</webURL>

        <labeller type="defaultlabeller">

            <prefix>1.0.0.</prefix>

        </labeller>

        

        <sourcecontrol type="svn">

            <trunkUrl>http://localhost/svn/svn/trunk</trunkUrl>

            <workingDirectory>D:\test\svn_client_http\trunk</workingDirectory>

            <username>sampleuser</username>

            <password>sampleuser</password>

        </sourcecontrol>

        

        <triggers>

            <scheduleTrigger time="20:00" buildCondition="ForceBuild" name="Scheduled" />

        </triggers>

        

        <tasks>

            <exec>

                <executable>powershell.exe</executable>

                <baseDirectory>D:\test\tools</baseDirectory>

                <buildArgs>D:\test\tools\rcversion.ps1 "consoleProject" "D:\test\svn_client_http\trunk\console\console\console.rc"</buildArgs>

            </exec>

            

            <devenv>

                <solutionfile>D:\test\svn_client_http\trunk\console\console.sln</solutionfile>

                <configuration>Release</configuration>

            </devenv>

 

            <exec>

                <executable>powershell.exe</executable>

                <baseDirectory>D:\test\tools</baseDirectory>

                <buildArgs>D:\test\tools\revert.ps1 "D:\test\svn_client_http\trunk\console"</buildArgs>

            </exec>

            

            <exec>

                <executable>powershell.exe</executable>

                <baseDirectory>D:\test\tools</baseDirectory>

                <buildArgs>D:\test\tools\tracversion.ps1 "example" "consoleProject"</buildArgs>                

            </exec>

        </tasks>

        

    </project>

</cruisecontrol>

CruiseControl.Net에서 빌드 후 http://localhost/trac/example/newticket 의 Version 을 보면 자동 등록됨을 볼 수 있다.

 

3.Symboll Server, Subversion Symbol Indexing 연동 (p274)

 

 

 

Release Server

    ccnet.config에 sourceDir은 컴파일된 결과물 폴더, publishDir은 결과물을 복사할 폴더 지정

    useLabelSubDirectory를 true시 버전별 폴더 생성. false를 지정폴더에 계속 파일을 덮어쓰도록한다.

            <buildpublisher>

                <sourceDir>D:\test\svn_client_http\trunk\console\Release</sourceDir>

                <publishDir>D:\test\releases\console</publishDir>

                <useLabelSubDirectory>true</useLabelSubDirectory>

            </buildpublisher>

 

    이런 파일들을 FTP나 Http로 폴더를 공개하여 배포할 수 있다.

    Trac을 통한 배포 (p292) : 생략

        Trac과 svn을 별도로 만들어 배포용 라이브러리를 관리하도록 한다.

 

백업

1.운영중인 Trac 백업

    - trac-admin.exe의 hotcopy로 백업 수행

    Ex) c:\Python26\Scripts\trac-admin.exe c:\trac\example hotcopy d:\backup\trac\example

 

    - trac-backup.ps1으로 편리하게 백업

    trac-backup.ps1을 스케쥴러에 등록하여 정기적으로 백업 시킴

2. 운영중인 svn 저장소 백업

    - svnadmin hotcopy 로 백업

    Ex) svnadmin.exe hotcopy c:\repose\example d:\backup\repos\example

 

    - svn-backup.ps1으로 편리하게 백업

3. 원격지 svn 저장소 백업

    svn1.4 부터 svnsync 라는 명령지원 : 원격지의 svn 을 증가된 리비전만 가져옴

    - 백업할 저장소 생성

        Ex) svnadmin create c:\backup\example

    - c:\backup\example\hooks에 pre-revprop-change.cmd라는 빈파일 생성 (필수)

    - 최초 원격지 svn 가져오기

        Ex) svnsync init file:///c:/backup/example http://192.168.1.100/svn/example

    - 이후 원격지 svn 가져오기

        Ex) svnsync sync file:///c:/backup/example

 

    * svn-sync.ps1는 c:\backup 아래의 모든 저장소에 대해 svnsync sync 명령을 수행함.

 

SVN 관련 도구들

SVN Notifier : http://svnnotifier.tigris.org/

    SVN 업데이트가 필요한지를 알려줌

 

 

 

Symbol Server의 활용 (p400)

 

Tip 1. SVN 충돌 해결

상황

    A가 revision 6의 sample.cpp 수정 후 커밋하여 revision 7이 됨.

    B 도 revision 6에서 sample.cpp 수정 후 커밋하여 충돌 발생.

문제 해결

    탐색기에서 해당 파일로 찾아가 오른쪽 메뉴에서 "TortoiseSVN > 충동 상황 편집(E)" 선택

    왼쪽 위 화면엔 저장소의 내용, 오른쪽 위 화면엔 B가 수정한 내용이 출력.

    아래 있는 부분에서 충돌 나는 부분에서 마우스 오른쪽 버튼으로 메뉴를 통해 편집하거나 직접 편집하여 파일 수정 후

    "TortoiseSVN > 충돌 해결됨(O)"을 선택하고 커밋한다.

 

Tip 2. 커밋한 것 되돌리기

    커밋한 내용을 되돌릴땐 되돌릴 revision으로 Merge(병합)하여 다시 커밋한다.

 

Tip 3. Trac/SVN 저장소 이름 변경

1. apache 정지

2. svn 저장소 이름 변경 : c:\repos\Hello 를 c:\repose\World로 변경

3. authz 파일 수정 : c:\repose\authz 파일

4. trac 폴더 변경 : c:\trac\hello 를 c:\trac\world 로 변경

5. trac.ini 파일 수정 : c:\trac\world\conf\trac.ini

6. Trac과 SVN 동히과 : 콘솔에서 "c:\Python26\Scripts\trac-admin.exe c:\trac\world resync" 실행

7. apache 시작

8. 개발자는 "TortoiseSVN > 저장소 URL 변경"으로 새로운 주소로 변경

 

Tip 4. 날짜 버전으로 빌드 (p428)

 

 

Tip 5. ccnet.config을 SVN으로 관리 (p446)

 

 

Tip 6. Visual Studio 6.0 사용

 

 

Tip 7. Visual Studio 2008 사용

 

Tip 8. 자동빌드 하지 않고 ForceBuild만 사용시

    ccnet.config 파일에서 <triggers /> 로 설정하면 자동빌드 안함.

    **주의. <triggers /> 조차 없을 경우 기본값인 60초마다 소스 변경사항 있을 경우 빌드가 수행 됨.

 

'버전관리' 카테고리의 다른 글

svn 리비전 정보 넣기  (0) 2015.04.02
pre-commit.bat svn 공백 메시지 막기  (0) 2013.08.07
doxygen, graphviz, doxycomment  (0) 2012.08.07
Virtual Box 포트 포워딩(port forwarding)  (0) 2012.03.02
CruiseControl.Net 설치  (0) 2012.03.02
moinmoin wiki 설치  (0) 2011.06.11