Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/jenkins/5.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/spring-boot/5.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
詹金斯:如何在后期构建部分执行powershell脚本?_Powershell_Jenkins_Jenkins Plugins - Fatal编程技术网

詹金斯:如何在后期构建部分执行powershell脚本?

詹金斯:如何在后期构建部分执行powershell脚本?,powershell,jenkins,jenkins-plugins,Powershell,Jenkins,Jenkins Plugins,我有一些代码需要在Postbuild部分执行(因为我需要一个文件(changelog),它只能在Postbuild事件中生成)。因为我需要这个任务只有在成功构建完成后才能执行 现在我无法在后期构建部分选择Powershell脚本(我已经安装了Powershell加载项,并且可以在构建部分添加Powershell) 我怎样才能做到这一点?在这个任务中,我需要移动几个文件(构建、混淆和变更日志) 谢谢您可以使用groovy后期构建步骤。然后从groovy启动powershell脚本如果有cmd任务,

我有一些代码需要在Postbuild部分执行(因为我需要一个文件(changelog),它只能在Postbuild事件中生成)。因为我需要这个任务只有在成功构建完成后才能执行

现在我无法在后期构建部分选择Powershell脚本(我已经安装了Powershell加载项,并且可以在构建部分添加Powershell)

我怎样才能做到这一点?在这个任务中,我需要移动几个文件(构建、混淆和变更日志)


谢谢

您可以使用groovy后期构建步骤。然后从groovy启动powershell脚本

如果有cmd任务,只需启动powershell并执行脚本?@4c74356b41是否有
cmd
任务?这是一个额外的插件,因为我没有它。目前,在搜索试图通过
batch
文件使用
PowerShell
脚本的人时,都没有成功,这就是为什么我没有朝这个方向搜索。PowerShell通过cmd@4c74356b41因为我没有用于后期构建的批处理选项,所以不会改变问题。好的,让我们退一步,为什么不能添加一个powershell步骤作为最后一步?