aco*_*ner 6 powershell jenkins
我们的 Jenkins 服务器多年来一直使用 Powershell 运行蛋糕脚本成功构建项目。今天突然间,我们开始在多个项目中收到以下错误:
12:10:46 Running build script...
12:10:46
12:10:46 Error: Unknown command 'Default'.
12:10:46
12:10:46 .\scripts\build.cake -target=Default -configuration=Release
12:10:46 -verbosity=Verbose -environment=dev -certificatePath=C:/Program Files
12:10:46 (x86)/xxxxx/Verisign Certificate -certificateName=xxxxxxxx_cert.pfx
12:10:46 -certificatePassword=xxxxxxxxxxx
12:10:46 ^^^^^^^ No such command
12:10:46
12:10:47 Build step 'Windows PowerShell' marked build as failure
Run Code Online (Sandbox Code Playgroud)
build.ps1 脚本没有改变。build.cake 脚本没有改变。自上次成功构建以来,Jenkins 没有更新,也没有更新任何加载项。
如果我从参数列表中删除“-target=Default”,我只会在“-configuration=Release”上得到相同的错误,指示未知命令:“Release”。
有没有其他人经历过这种情况?
小智 15
此失败的可能根本原因是蛋糕版本更新(0.38.x --> 1.0)
您有两种方法可以解决此问题
更改参数语法 - 应始终使用多破折号语法(例如 --target=Foo)而不是(例如 -target=Foo)调用参数 参考:https : //cakebuild.net/docs/getting-started/upgrade
固定蛋糕版
在tools/packages.config文件中指定Cake的版本参考:https : //cakebuild.net/docs/writing-builds/reproducible-builds/pinning-cake-version
| 归档时间: |
|
| 查看次数: |
715 次 |
| 最近记录: |