Example #1
0
def generateDatabaseStep(docTempdir, changeLogDir, changeLogFile):	
	Utile.writeLog("生成数据库更新步骤文档");
	Utile.generalFile(ConstantValue.CHANGELOG_UPDATESQL_PLAYNOW_TAG,ConstantValue.CHANGELOG_UPDATESQL_PLAYNOW_TAG_END,changeLogFile,docTempdir+ConstantValue.DATABASE_UPDATE_PLAYNOW_FILENAME);
	Utile.generalFile(ConstantValue.CHANGELOG_UPDATESQL_PLAYNOWLOG_TAG,ConstantValue.CHANGELOG_UPDATESQL_PLAYNOWLOG_TAG_END,changeLogFile,docTempdir+ConstantValue.DATABASE_UPDATE_PLAYNOWLOG_FILENAME);
	Utile.insertFile(ConstantValue.DEPLOMENT_RSTFILE_DATABASESTEP_TAG,docTempdir+ConstantValue.DEPLOYMENT_STEPS_FILENAME,changeLogDir+ConstantValue.PLAYNOW_DATEBASESETP_FILENAME);
	#生成数据库rollback步骤文档
	Utile.writeLog("生成数据库rollback步骤文档");
	Utile.generalFile(ConstantValue.CHANGELOG_ROLLBACKSQL_PLAYNOW_TAG,ConstantValue.CHANGELOG_ROLLBACKSQL_PLAYNOW_TAG_END,changeLogFile,docTempdir+ConstantValue.DATEABASE_ROLLBACK_PLAYNOW_FILENAME);
	Utile.generalFile(ConstantValue.CHANGELOG_ROLLBACKSQL_PLAYNOWLOG_TAG,ConstantValue.CHANGELOG_ROLLBACKSQL_PLAYNOWLOG_TAG_END,changeLogFile,docTempdir+ConstantValue.DATEABASE_ROLLBACK_PLAYNOWLOG_FILENAME);
	Utile.insertFile(ConstantValue.DEPLOMENT_RSTFILE_DATABASESTEP_TAG,docTempdir+ConstantValue.DEPLOYMENT_STEPS_FILENAME,changeLogDir+ConstantValue.PLAYNOW_DATEBASESETP_FILENAME);
	doWithSQLFile(docTempdir+ConstantValue.DATABASE_UPDATE_PLAYNOW_FILENAME)
	doWithSQLFile(docTempdir+ConstantValue.DATEABASE_ROLLBACK_PLAYNOW_FILENAME)
	doWithSQLFile(docTempdir+ConstantValue.DATABASE_UPDATE_PLAYNOWLOG_FILENAME)
	doWithSQLFile(docTempdir+ConstantValue.DATEABASE_ROLLBACK_PLAYNOWLOG_FILENAME)
	DealWithFile.zip_dir(docTempdir+ConstantValue.DATABASE_UPDATE_DIR,docTempdir+ConstantValue.DATABASE_UPDATE_DIR+'.zip' );
	DealWithFile.zip_dir(docTempdir+ConstantValue.DATABASE_ROLLBACK_DIR,docTempdir+ConstantValue.DATABASE_ROLLBACK_DIR+'.zip' );
Example #2
0
def generateDatabaseStep(docTempdir, changeLogDir, changeLogFile):
    Utile.writeLog("生成数据库更新步骤文档")
    Utile.generalFile(
        ConstantValue.CHANGELOG_UPDATESQL_PLAYNOW_TAG,
        ConstantValue.CHANGELOG_UPDATESQL_PLAYNOW_TAG_END, changeLogFile,
        docTempdir + ConstantValue.DATABASE_UPDATE_PLAYNOW_FILENAME)
    Utile.generalFile(
        ConstantValue.CHANGELOG_UPDATESQL_PLAYNOWLOG_TAG,
        ConstantValue.CHANGELOG_UPDATESQL_PLAYNOWLOG_TAG_END, changeLogFile,
        docTempdir + ConstantValue.DATABASE_UPDATE_PLAYNOWLOG_FILENAME)
    Utile.insertFile(
        ConstantValue.DEPLOMENT_RSTFILE_DATABASESTEP_TAG,
        docTempdir + ConstantValue.DEPLOYMENT_STEPS_FILENAME,
        changeLogDir + ConstantValue.PLAYNOW_DATEBASESETP_FILENAME)
    #生成数据库rollback步骤文档
    Utile.writeLog("生成数据库rollback步骤文档")
    Utile.generalFile(
        ConstantValue.CHANGELOG_ROLLBACKSQL_PLAYNOW_TAG,
        ConstantValue.CHANGELOG_ROLLBACKSQL_PLAYNOW_TAG_END, changeLogFile,
        docTempdir + ConstantValue.DATEABASE_ROLLBACK_PLAYNOW_FILENAME)
    Utile.generalFile(
        ConstantValue.CHANGELOG_ROLLBACKSQL_PLAYNOWLOG_TAG,
        ConstantValue.CHANGELOG_ROLLBACKSQL_PLAYNOWLOG_TAG_END, changeLogFile,
        docTempdir + ConstantValue.DATEABASE_ROLLBACK_PLAYNOWLOG_FILENAME)
    Utile.insertFile(
        ConstantValue.DEPLOMENT_RSTFILE_DATABASESTEP_TAG,
        docTempdir + ConstantValue.DEPLOYMENT_STEPS_FILENAME,
        changeLogDir + ConstantValue.PLAYNOW_DATEBASESETP_FILENAME)
    doWithSQLFile(docTempdir + ConstantValue.DATABASE_UPDATE_PLAYNOW_FILENAME)
    doWithSQLFile(docTempdir +
                  ConstantValue.DATEABASE_ROLLBACK_PLAYNOW_FILENAME)
    doWithSQLFile(docTempdir +
                  ConstantValue.DATABASE_UPDATE_PLAYNOWLOG_FILENAME)
    doWithSQLFile(docTempdir +
                  ConstantValue.DATEABASE_ROLLBACK_PLAYNOWLOG_FILENAME)
    DealWithFile.zip_dir(
        docTempdir + ConstantValue.DATABASE_UPDATE_DIR,
        docTempdir + ConstantValue.DATABASE_UPDATE_DIR + '.zip')
    DealWithFile.zip_dir(
        docTempdir + ConstantValue.DATABASE_ROLLBACK_DIR,
        docTempdir + ConstantValue.DATABASE_ROLLBACK_DIR + '.zip')
Example #3
0
                  CHANGE_LOG_FILE, TEMPFILE)
orgF = open(TEMPFILE, 'r')
steps = orgF.readlines()
orgF.close()
for line in steps:
    if (line.strip().strip('\n').split(':')[1] == 'false'):
        if AVAILABLE_FILES.has_key(line.strip().strip('\n').split(':')[0]):
            del AVAILABLE_FILES[line.strip().strip('\n').split(':')[0]]
for name, filename in AVAILABLE_FILES.items():
    DealWithFile.copyFiles(WORKSPACE_DIR + "\\" + filename,
                           PLAYNOW_PACKAGE_DIR + "\\" + filename)
Utile.writeLog("---END Generate the playnow installed package---")

Utile.writeLog("---BEGIN Generate the playnow docment---")
Utile.writeLog("start Generate the deployment plan doc")
GenerateDeployPlanFile.generateDeployPlanFile(PLAYNOW_DOCMENT_TEMPLATE_DIR,
                                              CHANGE_LOG_FILE)
Utile.writeLog("start Generate the deployment steps doc")
GenerateStepFile.generateStepFile(PLAYNOW_DOCMENT_TEMPLATE_DIR,
                                  CHANGE_LOG_FILE, CHANGELOG_DIR,
                                  OUTZIP_FILENAME)
Utile.writeLog("start Generate the deployment testcase doc")
GenerateTestFile.generateTestCaseFile(PLAYNOW_DOCMENT_TEMPLATE_DIR,
                                      CHANGE_LOG_FILE, CHANGELOG_DIR)
os.system(COMMAND_COMPILE_PALNOW_DOC_BAT)
DealWithFile.copyFiles(PLAYNOW_DOC_HTML_DIR, PLAYNOW_DOCMENT_DIR)
Utile.writeLog("---END Generate the playnow docment---")
DealWithFile.zip_dir(BINDIR, OUTZIP_FILEPATH)
Utile.writeLog(
    "------------BEGIN GENGRATE PLAYNOW PACKAGE AND ZIP THE OUTPUT FILE------------"
)
Example #4
0
Utile.writeLog("---BEGIN Generate the playnow installed package---")
AVAILABLE_FILES = {'2PlayNowService'     : "PlayNowService",
             '3PlayNowManager' : "PlayNowManager",
             '4WebAppStore'   : "WebAppStore",
			 '5PlayNowWinService' : "PlayNowWinService"
     }
Utile.generalFile(ConstantValue.CHANGELOG_UPDATEAPPLICATION_TAG,ConstantValue.CHANGELOG_UPDATEAPPLICATION_TAG_END,CHANGE_LOG_FILE,TEMPFILE);
orgF = open(TEMPFILE,'r')
steps = orgF.readlines()
orgF.close(); 
for  line in  steps:   
		if(line.strip().strip('\n').split(':')[1] == 'false'):  
			if AVAILABLE_FILES.has_key(line.strip().strip('\n').split(':')[0]):
				del AVAILABLE_FILES[line.strip().strip('\n').split(':')[0]]    
for name, filename in AVAILABLE_FILES.items():
	DealWithFile.copyFiles(WORKSPACE_DIR+"\\"+filename, PLAYNOW_PACKAGE_DIR+"\\"+filename)
Utile.writeLog("---END Generate the playnow installed package---")
	
Utile.writeLog("---BEGIN Generate the playnow docment---")
Utile.writeLog("start Generate the deployment plan doc")
GenerateDeployPlanFile.generateDeployPlanFile(PLAYNOW_DOCMENT_TEMPLATE_DIR,CHANGE_LOG_FILE)
Utile.writeLog("start Generate the deployment steps doc")
GenerateStepFile.generateStepFile(PLAYNOW_DOCMENT_TEMPLATE_DIR,CHANGE_LOG_FILE, CHANGELOG_DIR, OUTZIP_FILENAME)
Utile.writeLog("start Generate the deployment testcase doc")
GenerateTestFile.generateTestCaseFile(PLAYNOW_DOCMENT_TEMPLATE_DIR,CHANGE_LOG_FILE, CHANGELOG_DIR)
os.system(COMMAND_COMPILE_PALNOW_DOC_BAT)
DealWithFile.copyFiles(PLAYNOW_DOC_HTML_DIR, PLAYNOW_DOCMENT_DIR)
Utile.writeLog("---END Generate the playnow docment---")
DealWithFile.zip_dir(BINDIR,OUTZIP_FILEPATH );
Utile.writeLog("------------BEGIN GENGRATE PLAYNOW PACKAGE AND ZIP THE OUTPUT FILE------------")