Version baseline automation of Windows

Source: Internet
Author: User
Tags ldap rar schtasks

1. Background:

The current project maintenance cycle process, the production of debug version and release version more frequent, the process is too cumbersome and arbitrary, and packaging producers become bottlenecks, in order to standardize the version of the baseline process and achieve full automation participation, the development of version of the baseline Automation program.

2. Target:

Version of the implementation of the baseline Automation program, the main tasks are divided into configuration management automation, compile to do package automation, release automation. The main goal is to achieve a one-click Package and release, reduce human error operation, release human resources, improve development efficiency.

3. Environment:

Software Environment: Windows Server R2

Hardware environment: Memory: 8G HDD: 100G

Configuration tool: Server side: Visualsvn-server-3.5.3-x64 client: tortoisesvn_x64_1.8.8.25755

Bag making tools: InstallShield 2010/tar

Transfer tool: Xmanager4 (Telent, SSH)

Compilation environment: Two virtual machines: Windows Server R2/valuereporting 3.0

Compilation tool: VS2008/GCC

4, Detailed description:

1 ) determine the version release time

Iteration Task partitioning determines the release time of the version.

2 ) Submit Code

Before uploading the code, the first module to complete the self-inspection, Output unit test report, the code needs to be inspected by the viewer after the code review report, upload SVN in the specified format to fill in the information (the successor, the viewer, modify the description, Modified date), the format is not correct, cannot be submitted. Try to do a function point only upload once, emphasizing one time to do things right. The data modification also needs to be inspected to upload.

3 ) Lock the configuration library

After the version is sealed, the configuration administrator closes all developer write permissions to the configuration library, locks the code, and creates a version baseline directory on the baseline server.

4 ) Environment Cleanup

The baseline server deletes the last checked-out code, and the compilation server deletes the code that was uploaded from the baseline server, the binaries that were compiled locally, and the installation package.

5 ) code Check out

The baseline server checks out the latest code with the SVN tool.

6 ) Compress upload

Package code compression and upload it to the compilation server directory.

7 ) Decompression

Extract the code compression package to the current directory.

8 ) code compilation

Execute the compilation script to complete the code compilation.

9 ) software Packaging

The Windows platform implements software packaging through the InstallShield project, and the Linux platform uses the TAR tool to package software.

Ten ) Upload version baseline library

The installation package is uploaded to the baseline repository under the specified directory.

One ) Take the package self-test

Developers from the baseline library to take the package self-test, if no functional issues, you can notify the configuration administrator to complete the baseline, if there is a problem, after discussion of the proposal to modify the scheme, implement code modification, complete the self-inspection notification configuration Administrator to open code submission permissions, complete the code upload, the baseline process returns the lock configuration library process.

A ) version baselines

Configure the Administrator to package all external content, complete the MD5 checksum, and save the corresponding code to the SVN tag directory

5. Flowchart:

Okay, so much to start with, general idea:

1. Cleanwork.bat: Clean up the environment, clear the temporary files generated by the last Automation package, and perform the scheduled tasks of 93 server remotely >clean.bat;

2, BUILD.bat: Call the Cleanwork.bat script, and the SVN server IP 234 Check out the code, using the WinRAR tool compression;

3. Copyrar.bat: Send compressed files to the compilation server with IP 93, and perform a scheduled task of 93 server remotely by using shared mode >main.bat;

4, Main.bat: Execute 93 server Control script, unzip the file,

4.1, Alone_windows.bat: Execute the compilation script, here I Java uses the Ant tool compiles,

4.2, Copycinstall.bat:c uses VS, because C this side of the recent not how to develop, so I will directly copy the previously compiled directly,

4.3, start the InstallShield Packaging tool, Packaging, Copysetup.bat: The package file to use the file share to the SVN server, and remotely perform the scheduled task of 234 server >opensetup.bat,

5, Opensetup.bat: Finally open the location of packaging files;

BUILD.bat

REMCheck out the code, and compressREMDQREM2018/02/11@echo off Setresourceurl=https://192.168.0.234/qhldap/src/6.0/trunk/WindowsSetResourcepath=d:\yb\qhldap\6.0\src\WindowsSet_winrar=c:\progra~1\winrar\winrar.EXESetsvnurl=https://192.168.0.234/qhldap/Shipping Documents/6.0/TrunkSet_silent= "D:\ Directory Services Management system \v6.0\qh-ldap_6.01.001\ installation package \ Windows"::remotely execute a scheduled task named "cleanwindows_6.0" in the compilation server, deleting the last fileschtasks/Run/s 192.168.0.93/u administrator/p 123456/tn cleanwindows_6.0::clear the last file generatedPagerD:\yb\QHLDAP\6.0\windows\cleanwork.Bat::Remote compilation ServerPagerD:\YB\QHLDAP\6.0\WINDOWS\RUNMSTSC.Batif  not exist"%resourcepath%" (::checking out code ...SVN checkout--username "Autoscript"--password "123456"-Q%resourceurl% "%resourcepath%")Else(::Updating code ...TortoiseProc.exe/Command: Update/Path: "%resourcepath%"/closeonend:1)svn checkout--username"Autoscript"--password "123456"-Q%svnurl% "%_silent%"Rd/s/q%_silent%\.SVN::compress files, do not compress. svn file-A to back up all files-ep1 Save the structure of compressed files-ibck for background compression-R traversal%_winrar% a-ep1-r D:\yb\QHLDAP\6.0\src\trunk_win.rar D:\yb\QHLDAP\6.0\src\Windows\* ::Copying FilesPagerD:\yb\QHLDAP\6.0\windows\copyrar.Bat@echo  on

Cleanwork.bat

REMClean up filesREMDQREM2018/02/11SetPackage=d:\ Directory Services Management system \v6.0\qh-ldap_6.01.001\ installation package \Windows::Delete the last compressed filedel/Q/S D:\yb\QHLDAP\6.0\src\trunk_win.rarRd/Q/S%package%\APIRd/Q/S%package%\DocRd/Q/S%package%\LicenseRd/Q/S%package%\Setupdel/Q/S%package%\readme.txt

Copyrar.bat

REM copy the compressed files to the compilation server and perform the scheduled Tasks REM  rem  2018/02/11:: Building shared net use \\192.168.0.93\yb\6.0\ Workspace 123456/user: Administrator:: Copy compressed files to the compilation server via file sharing  :: remotely execute a scheduled task named "Qhldap_6.0_93" in the compilation server schtasks/run /s 192.168.0.93/u administrator/p 123456/tn qhldap_6.0_93

Compiling server 93

Main.bat

REMMain controlREMCreate by DQREMCreate Date 2018/01/09Set_work=d:\yb\6.0\WorkspaceSet_setuppath=d:\yb\6.0\workspace\package\qh-ldap\media\single_exe_image\package\setup.EXESet_classjar=d:\yb\6.0\workspace\package (WINXLDAP) \winldap\gfaldap-web\web\web\webapp\ldapproject\web-inf\ClassesREMDecompression Trunk_win.rarC:\progra~1\winrar\winrar x-ep1-y%_work%\trunk_win.rar%_work%::rd/s/q%_work%\.svnREMRun Compilers.batCD/d "%_work%\package (WINXLDAP) \script"PagerAlone_windows.BatCD/d "D:\yb\6.0\script"PagerD:\yb\6.0\scripts\copyCInstall.Batdel/a/f/q "D:\yb\6.0\workspace\package (WINXLDAP) \winldap\gfaldap-web\web\web\webapp\ldapproject\web-inf\classes\*. JarREMRun InstallShieldStartD:\yb\6.0\workspace\package\QH-LDAP.ISMREMrun ' RUNMSTSC ' scheduled taskREMschtasks/run/s 192.168.0.234/u administrator/p [email protected]/i/tn qhldap_6.0_234REMDynamic Condition Monitor: LoopPing Localhost-n3 >nulif  not exist%_setuppath%Gotoloopping localhost-n4 >nulPagerD:\yb\6.0\scripts\copysetup.BatREMClose InstallShield ServiceTaskkill/f/im Isdev.exe

Alone_windows.bat

REMcompiler ' Initldap ' and ' Ldapproject 'REMCreate by DQREMCreate Date 2017/5/10@echo offSet_filelog=Debug.txtSet_init=ant-f init.XMLSet_ldap=ant-f Ldap.XMLSet_crt= "D:\tools\SecureCRT"Set_ant= "D:\yb\6.0"Set_tar=d:\yb\workspace\ConsoleSet_currpath= "D:\yb\6.0\workspace\package (WINXLDAP) \script"Set_compile_log=Debug.txtSet_upload_log= "/.. /.. /.. /yb/workspace/package (WINXLDAP)/script/%_filelog% "CD/D%_currpath%REMDelete Logif exist Debugtxtdel/q/f/A%_filelog%)CD%_ant%REMcompilerREMCall %_init%Pager%_ldap%REMstart compiler C CD/D%_currpath%REMCall Prepare_windows.bat

Copycinstall.bat

REMClean d:\yb\workspace\*REMCreate by DQREMCreate Date 2017/5/10@echo offSet_bin=d:\yb\6.0\c\bin\*Set_work=d:\yb\6.0\c\work\*Set_setupbin=d:\yb\6.0\workspace\package (WINXLDAP) \winldap\gfaldap-web\server\binSet_setupwork=d:\yb\6.0\workspace\package (WINXLDAP) \winldap\gfaldap-web\server\ WorkCopy%_bin%%_setupbin%Copy%_work%%_setupwork%

Copysetup.bat

REMSetup OperationREMCreate by DQREMCreate Date 2018/01/10REMCopy to 192.168.0.234Net  Use* /del/yNet  Use\\192.168.0.234 [email protected]/user: AdministratorCopyD:\yb\6.0\workspace\package\QH-Ldap\Media\SINGLE_EXE_IMAGE\Package\Setup.exe \\192.168.0.234\ Directory service Management system \v6.0\ Qh-ldap_6.01.001\ installation Package \windows\SetupREMDelete setup.exedelD:\yb\6.0\workspace\package\QH-Ldap\Media\SINGLE_EXE_IMAGE\Package\Setup.EXEREMrun ' opensetup ' scheduled taskschtasks/Run/s 192.168.0.234/u administrator/p [email protected]/i/tn opensetup6.0

Clean.bat

REMClean d:\yb\workspace\*REMCreate by DQREMCreate Date 2017/5/10@echo offSet_work=d:\yb\6.0\WorkspaceSet_log=d:\tools\compilerproject\alone\cleanlog.txtSet_console=%_work%\ConsoleSet_ldapserver=%_work%\LdapserverSet_package=%_work%\ PackageSet_package (WINDXLDAP) =%_work%\package (WINXLDAP)Set_trunk_win=%_work%\trunk_win.rarCD/D%_work%del/S/Q%_trunk_win%Rd/s/q%_work%\.SVNRd/S/Q%_console%Rd/S/Q%_ldapserver%Rd/S/Q%_package%Rd/s/q%_package (WINDXLDAP)%

After everything is done, double-click the BUILD.bat script, here I will no longer describe how to add scheduled tasks, file sharing, svn command and WinRAR command, the Internet has a lot of relevant information.

Version baseline automation of Windows

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.