Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在部署新版本的代码之前,使用CruiseControl.net中的Powershell备份现有文件夹_Powershell_Continuous Integration_Cruisecontrol.net - Fatal编程技术网

在部署新版本的代码之前,使用CruiseControl.net中的Powershell备份现有文件夹

在部署新版本的代码之前,使用CruiseControl.net中的Powershell备份现有文件夹,powershell,continuous-integration,cruisecontrol.net,Powershell,Continuous Integration,Cruisecontrol.net,我想先压缩一堆文件(.exe和.dll),然后再用新版本覆盖它们。有没有一种简单的方法来压缩文件而不使用某种dll 只需创建一个带有构建编号/日期时间戳的文件夹也会非常有效。我如何将巡航控制构建过程中的参数传递到我的Powershell脚本中,然后该脚本将完成工作 这是一种可持续的做事方式吗 谢谢您可以直接使用CCNET,也可以通过CCNET 1.5中引入的压缩包压缩文件 PowerShell任务的配置示例: <powershell> <description>Add

我想先压缩一堆文件(.exe和.dll),然后再用新版本覆盖它们。有没有一种简单的方法来压缩文件而不使用某种dll

只需创建一个带有构建编号/日期时间戳的文件夹也会非常有效。我如何将巡航控制构建过程中的参数传递到我的Powershell脚本中,然后该脚本将完成工作

这是一种可持续的做事方式吗


谢谢

您可以直接使用CCNET,也可以通过CCNET 1.5中引入的压缩包压缩文件

PowerShell任务的配置示例:

<powershell>
  <description>Adding scheduled jobs</description>
  <scriptsDirectory>ScheduledTasks</scriptsDirectory>
  <script>CreateScheduledJobsFromListOfTasks.ps1</script>
  <buildArgs>-zipDir="C:\foo"</buildArgs>
</powershell>

添加计划作业
计划任务
CreateScheduledJobsFromListOfTasks.ps1
-zipDir=“C:\foo”

所以这就是我想知道的方法。我已经安装了PowerShell任务,它正在运行PowerShell脚本,但是现在我需要让脚本做一些事情。在我看来,文档非常简单。那么问题出在哪里呢?是PowerShell还是CCNET?也许你应该考虑包发行商……这是我对Power Shell的任务之一(见BelWO),但是在移动文件时,我需要从CCNET传递至少一个参数到电源外壳。我不知道如何才能做到这一点。添加计划作业ScheduledTasks CreateScheduledJobsFromListOfTasks.ps1您可以通过
元素将参数传递给PowerShell。我添加了一个示例配置。我认为这是正确的。根据问题的描述,你的回答应该有助于解决问题。