#1
|
|||
|
|||
Failed to add Run Script script code: Unknown error
I am receiving the error message in the subject when a particular step executes. The step is a vbs script that runs for setting up email notifications based on certain conditions. When it fails, which it does every time the first time it hits it, I restart it and it completes successfully. The same code is called later and it also completes successfully. It just seems as though the script fails the first time only. Below is the step code.
I have verified that all of the macros referenced exist. The other thing to mention is that this step was copied from another bld script where it does NOT exhibit this problem. Your help is appreciated. <step action='Run Script'> <Language>VBScript</Language> <Script><![CDATA[dim BuildType, BUILD_EMAIL_Install, BUILD_EMAIL_SEND Dim BUILD_EMAIL_MESSAGE Dim BUILD_EMAIL_MESSAGE_Header, BUILD_EMAIL_MESSAGE_BUILD, BUILD_EMAIL_MESSAGE_Footer, BUILD_EMAIL_MESSAGE_Failure BuildType = "%BUILDTYPE%" BUILD_EMAIL_SEND=TRUE BUILD_EMAIL_MESSAGE_BUILD="" BUILD_EMAIL_MESSAGE_Failure="" IF BuildType="INTEGRATION" THEN BUILD_EMAIL_MESSAGE_BUILD = _ "DB REV: %SS_DBREV% " & vbcrlf & _ "Output: <%Delivery_Directory_BUILD%>." & vbcrlf BUILD_EMAIL_Install=application.Macros(vbldProject ).Item("Build_Email_Install") ElseIf BuildType="DAILY" THEN BUILD_EMAIL_MESSAGE_BUILD = "Output: <%Delivery_Directory_BUILD%>." & vbcrlf BUILD_EMAIL_Install="" ElseIf BuildType="CUSTOM" THEN BUILD_EMAIL_MESSAGE_BUILD = "The package can be found <%Delivery_Directory_BUILD%>" BUILD_EMAIL_SEND=FALSE End If BUILD_EMAIL_MESSAGE_Header = _ "Product: %Main_Product_Name% " & vbcrlf & _ "Module: %Build_Module% " & vbcrlf & _ "Build Type: %BUILDTYPE% " & vbcrlf & _ "Complete Dttm: %DATETIME%" & vbcrlf & _ "Merge Module: %MSM_File%" & vbcrlf & _ "Build Status: %BUILD_STATUS%" & vbcrlf & vbcrlf IF "%BUILD_STATUS%"<>"SUCCESS" THEN BUILD_EMAIL_MESSAGE_Failure = _ "-- FAILURE DETAIL --" & vbcrlf & _ "Failed Step: %FailStep_Name%" & vbcrlf & _ "Step Output: %FailStep_Output%" & vbcrlf & _ "Step Status: %FailStep_Status%" & vbcrlf & vbcrlf END IF BUILD_EMAIL_MESSAGE_Footer = "This build was run by %BUILD_INDUCER_NAME% on %COMPUTERNAME%." & vbcrlf BUILD_EMAIL_MESSAGE = BUILD_EMAIL_MESSAGE_Header & BUILD_EMAIL_MESSAGE_BUILD & BUILD_EMAIL_MESSAGE_Failure & BUILD_EMAIL_MESSAGE_Footer application.Macros(vbldTempoary).Add "BUILD_EMAIL_MESSAGE",BUILD_EMAIL_MESSAGE application.Macros(vbldTempoary).Add "BUILD_EMAIL_Install",BUILD_EMAIL_Install application.Macros(vbldTempoary).Add "BUILD_EMAIL_SEND",BUILD_EMAIL_SEND SET BuildType =nothing set BUILD_EMAIL_Install =nothing set BUILD_EMAIL_SEND =nothing set BUILD_EMAIL_MESSAGE =nothing set BUILD_EMAIL_MESSAGE_Header =nothing set BUILD_EMAIL_MESSAGE_BUILD =nothing set BUILD_EMAIL_MESSAGE_Footer =nothing ]]></Script> <buildfailsteps type='11'>0</buildfailsteps> <indent type='3'>1</indent> <name>SET RECIPIENTS/MESSAGE</name> </step> |
Thread Tools | |
Display Modes | Rate This Thread |
|
|