I've created a bug for this on the issue tracker: PowerShell Task: Parameters not passed to PowerShell script (Bug #261)<http://cruisecontrolnet.org/issues/261>. I've attached the files I modified to fix this issue to the bug report.
From: [email protected] [mailto:[email protected]] On Behalf Of Jensen, Aaron Sent: Wednesday, January 23, 2013 5:29 PM To: [email protected] Subject: RE: [ccnet-user] CCNet 1.8.3 released And here's the fix: project\core\tasks\PowerShellTask.cs:398 - builder.AppendArgument("-file"); + builder.AppendArgument("-Command"); project\UnitTests\Core\Tasks\PowerShellTaskTest.cs:165 - CustomAssertion.AssertStartsWith(@"-nologo -NoProfile -NonInteractive -file ""D:\CruiseControl\MyScript.ps1""", info.Arguments); + CustomAssertion.AssertStartsWith(@"-nologo -NoProfile -NonInteractive -Command ""D:\CruiseControl\MyScript.ps1""", info.Arguments); From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Jensen, Aaron Sent: Wednesday, January 23, 2013 5:02 PM To: [email protected]<mailto:[email protected]> Subject: RE: [ccnet-user] CCNet 1.8.3 released The PowerShell task does not work in v1.8.3 if using the <buildArgs> configuration option, i.e. if you run your script with arguments. It seems CCNet invokes PowerShell like so: "powershell.exe" -nologo -NoProfile -NonInteractive -file $(script) $(buildArgs) The -File parameter just executes its value with no parameters. The $(buildArgs) parameters are interpreted as arguments to PowerShell itself, and ignored. CCNet should be using the -Command parameter: "powershell.exe" -nologo -NoProfile -NonInteractive -Command $(script) $(buildArgs) <:> Aaron From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Jensen, Aaron Sent: Thursday, January 03, 2013 12:12 PM To: [email protected]<mailto:[email protected]> Subject: RE: [ccnet-user] CCNet 1.8.3 released We attempted to use CCNet 1.8.2, but none of our PowerShell tasks worked. I can't remember what the error was specifically. I guess we'll try again with 1.8.3. <:> Aaron From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Ruben Willems Sent: Thursday, January 03, 2013 1:04 AM To: [email protected]<mailto:[email protected]> Subject: Re: [ccnet-user] CCNet 1.8.3 released HI if it is not listed in the release notes, it's not fixed. What issue are we talking about? with kind regards Ruben Willems On 3 January 2013 00:07, Jensen, Aaron <[email protected]<mailto:[email protected]>> wrote: Does this fix the issue with the PowerShell task? I don't see it mentioned in the release notes. It is the one issue that prevents us from upgrading. From: [email protected]<mailto:[email protected]> [mailto:[email protected]<mailto:[email protected]>] On Behalf Of Ruben Willems Sent: Sunday, December 30, 2012 8:29 AM To: [email protected]<mailto:[email protected]>; ccnet-devel Subject: [ccnet-user] CCNet 1.8.3 released Hi all The third fix for 1.8 has been released : 1.8.3 Highlights : * Several Parallel Task fixes * the syntax highlighter disables itself it logs are to big default <buildLogBuildPlugin disableHighlightingWhenLogExceedsKB="50"/> * Several preprocessor fixes Below are the things that are fixed : * Issue with multiple email converters * Parallel task does not work anymore in 1.8 * Version 1.8 takes an age to load build artefacts * Parallel task sometimes crashes * Parallel task seems to somtimes ignore exit codes * Issue with CCNet and CCNetFailureUsers argument * Comment in tasks of sequential task makes preprocessor loose its count * Conditional task runs all task even if one has failed * Cctray does not sort correctly by date for UK dates * Project name in ccnet.config cannot contain double space * View Build Log hangs or crashes Web Browser * VSTS (TFS) SourceControl adds Domain Name to Workspace name causing build failure * Fix sorting in the main CCTray window * When RSS publisher is used, it should be possible to see rss feed, even if security is on * HtmlReportPlugin: does not show content for failed builds ("Unable to find file") * CCTray Exec: Spaces in path not supported, error: Unable to execute command * Git log entries with unicode chars * Regression in MSBuild following Issue #191 * Comment in tasks of sequential task makes preprocessor loose its count again (Issue 193 followup) * Any text in nodes make the preprocessor loose its count (Issue 225 followup) * Function convertTimeIntoSeconds(time) in StatisticsGraphs.js Returns Zero If time="00:00:08" or time="00:00:09" * Webdashboard plugin for ReportGenerator * StyleCop and unit testing webdashboard xsl you can download it from : https://sourceforge.net/projects/ccnet/ or http://build.nauck-it.de/download/CruiseControl.NET-package/1.8.3.0/ with kind regards Ruben Willems on behalve of the CCNet team -- -- -- --- You received this message because you are subscribed to the Google Groups "ccnet-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
