Hi Ruben,

Thanks for your note. Since the PS task is running in CCDN as a PowerShell 
task, I don't have the ability to insert an echo %errorlevel%. 

I'll change the project definition to use a sequential task and put an exec 
task right behind the PowerShell task.  I've included the code below:
<cb:scope ProjectName="OF012_205.60Load">
<cb:define ProjectType="_Cron"/>
<cb:define WorkingMainDir = "C:\Development" />
<cb:define ArtifactsDir = "Artifacts"/>
<cb:define ClearCaseViewName = "of_view" />
<cb:define PathToScript 
="C:\src\of_view\web2000\of_app\of\sdk\test\autoload" />
<project name="$(ProjectName)$(ProjectType)" queue="Q3" queuePriority="1">
<category>Daily Tasks</category>
<workingDirectory>$(WorkingMainDir)\$(ProjectName)\$(ProjectType)</workingDirectory>
<artifactDirectory>$(WorkingMainDir)\$(ProjectName)\$(ProjectType)\$(ArtifactsDir)</artifactDirectory>
<triggers> 
<scheduleTrigger time="17:00" buildCondition="ForceBuild" name="Scheduled">
<weekDays>
<weekDay>Monday</weekDay>
<weekDay>Tuesday</weekDay>
<weekDay>Wednesday</weekDay>
<weekDay>Thursday</weekDay>
<weekDay>Friday</weekDay>
</weekDays>
</scheduleTrigger>
</triggers>
<tasks>
<sequential continueOnFailure="true">
<description>Trying to debug the powershell script</description>
<tasks>
<powershell>
<buildArgs>-VMName M3_Dev_205.60_Infra6</buildArgs>
<scriptsDirectory>$(PathToScript)</scriptsDirectory>
<script>autoload.ps1</script>
<successExitCodes>0</successExitCodes>
<buildTimeoutSeconds>1800</buildTimeoutSeconds>
</powershell>
<exec executable="echo %errorlevel%" />
</tasks>
</sequential>
</tasks>
<publishers>
<xmllogger />
<cb:eml/>
 </publishers>
<cb:defaultSecurity/>
</project>
 </cb:scope>

Is that what you meant?

Ken

On Sunday, August 19, 2012 2:47:06 AM UTC-7, Ruben Willems wrote:
>
> Hi
>
> what is the return value?
> if you do echo %errorlevel% immediately after the ps script,
> what number do you see?
>
> with kind regards
> Ruben Willems
>
>
> On 15 August 2012 23:22, KenBobPDX <[email protected] <javascript:>>wrote:
>
>> I'm trying to figure out why CCDN (1.8) reports a PowerShell script task 
>> is failing when it is not.  The PS task uses the VMWare library to stand up 
>> a virtual box and load our latest build. When I look at the build log, it 
>> shows that everything completed properly.
>>
>> I have put some Write-Output lines inside the PS script to show the 
>> current state and insure no errors have occurred and they are reporting as 
>> I expected, no errors.  Yet, CCDN is reporting a failed build. I have 
>> checked the CCDN trace and log files and they don't report anything in 
>> regards to this project.  I have also checked the Windows event logs and 
>> not found anything.  What am I missing?  Can someone point me in the right 
>> direction please?
>>
>
>

Reply via email to