views:

91

answers:

1

Hi

I would like to zip a bunch of files (.exe and .dll) before I overwrite them with the new build. Is there a simple way to zip files without using some sort of dll?

Just creating a folder with the build number / date time stamp will also work great. How do I pass parameters from the cruise control build process into my Powershell script that will do the work then?

Is this a sustainable way to do things?

Thanks

+2  A: 

You could either use CCNET's Package Publisher Task directly or zip the files via the PowerShell Task introduced in CCNET 1.5.

Configuration sample for PowerShell Task:

<powershell>
  <description>Adding scheduled jobs</description>
  <scriptsDirectory>ScheduledTasks</scriptsDirectory>
  <script>CreateScheduledJobsFromListOfTasks.ps1</script>
  <buildArgs>-zipDir="C:\foo"</buildArgs>
</powershell>
The Chairman
So that is what I am trying to figure out how to do. I have the PowerShell Task setup, and it is running a powershell script, but now I need to make the script do something.
Rihan Meij
IMO the documentation is pretty straightforward. So where is the problem? Is it PowerShell or is it CCNET? Perhaps You should consider Package Publisher...
The Chairman
This is one of the tasks that I have for powershell (see belowe) but in moving the files across I need to pass at least one parameter into power shell from CCNET. And I have no idea how to achieve that. <powershell> <description>Adding scheduled jobs</description> <scriptsDirectory>ScheduledTasks</scriptsDirectory> <script>CreateScheduledJobsFromListOfTasks.ps1</script> </powershell>
Rihan Meij
You could pass arguments to PowerShell via `<buildArgs>` element. I added a sample configuration.
The Chairman
This looks correct to me. Given the description of the problem your answer should help solve it.
Scott Saad