jenkins - 詹金斯没有找到PowerShell
问题描述
当我尝试在我的 biuld 中运行 Windows Powershell 命令时出现此错误。我不知道如何将 Powershell.exe 添加到此?这是一个插件,我不知道它的位置或如何使用它。
[DeploymentTest] $ powershell.exe -NonInteractive -ExecutionPolicy ByPass "& '/tmp/jenkins8870821876113230026.ps1'"
FATAL: command execution failed
java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
. . .
Caused: java.io.IOException: Cannot run program "powershell.exe" (in directory "/var/lib/jenkins/workspace/DeploymentTest"): error=2, No such file or directory
解决方案
您正在 Linux 机器上运行它。请切换到 Windows 机器,因为您需要 Windows 来运行 powershell。
推荐阅读
- python - Seaborn python 在绘图上更改颜色系列
- c# - ASP.NET Core 中的 NUnit 测试 UserManager、roleManager
- ruby-on-rails - 如何在 Rails 3.2 中引用这个路径名?
- socket.io - MQTT vs Socket.IO 关于网络带宽使用
- python - docker中的多进程架构
- ios - 如何控制 UITabBar selectedIndicatorImage 的高度
- java - 如何根据用户输入决定调用哪个方法?
- javascript - 如何正确地将用户名和密码从 reactjs 传递到后端进行身份验证?
- php - 如何在 Laravel Forge 中运行 websockets 守护进程
- python - 是否可以在没有模型或正在运行的会话的情况下使用 Conv2D 层?