在Jenkins(管道项目)中触发构建时,我面临以下指定的问题。但是当我从PowerShell提示符运行时没有出现问题。
我们在奴隶(远程)机器上运行这项工作。在该远程计算机中,构建正常运行。当我在Jenkins中自动化时,我遇到了以下失败。
Executing task: build
Executing: ../venv/Scripts/python.exe utils.py src ../cireports
Executing: jshint --reporter=checkstyle ../src/poststudio >../cireports/JsHintAnalysis.xml
An error occurred when executing task 'build'.
---> System.IO.IOException: The handle is invalid.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.Console.GetBufferInfo(Boolean throwOnNoConsole, Boolean& succeeded)
at Cake.Powershell.CakePSHostRawUserInterface.get_BufferSize()
at Microsoft.PowerShell.Commands.OutFileCommand.InstantiateLineOutputInterface()
at Microsoft.PowerShell.Commands.OutFileCommand.BeginProcessing()
at System.Management.Automation.Cmdlet.DoBeginProcessing()
at System.Management.Automation.CommandProcessorBase.DoBegin()
--- End of inner exception stack trace ---
at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at Cake.Powershell.PowershellRunner.Invoke(String script, PowershellSettings settings)
at Submission#0.StartPowershellScript(String script)
at Submission#0.<.ctor>b__6()
at Cake.Core.CakeTaskBuilderExtensions.<>c__DisplayClass5_0.<Does>b__0(ICakeContext context)
at Cake.Core.ActionTask.Execute(ICakeContext context)
at Cake.Core.DefaultExecutionStrategy.Execute(CakeTask task, ICakeContext context)
at Cake.Core.CakeEngine.ExecuteTask(ICakeContext context, IExecutionStrategy strategy, Stopwatch stopWatch, CakeTask task, CakeReport report)
at Cake.Core.CakeEngine.RunTarget(ICakeContext context, IExecutionStrategy strategy, String target)
at Cake.Scripting.BuildScriptHost.RunTarget(String target)
at Submission#0..ctor(Session session, Object& submissionResult)
at Submission#0.<Factory>(Session session)
at Roslyn.Scripting.CommonScriptEngine.Execute[T](String code, String path, DiagnosticBag diagnostics, Session session, Boolean isInteractive)
at Roslyn.Scripting.Session.Execute(String code)
at Cake.Scripting.Roslyn.Stable.DefaultRoslynScriptSession.Execute(Script script)
at Cake.Core.Scripting.ScriptRunner.Run(IScriptHost host, FilePath scriptPath, IDictionary`2 arguments)
at Cake.Commands.BuildCommand.Execute(CakeOptions options)
at Cake.CakeApplication.Run(CakeOptions options)
at Cake.Program.Main()
[Pipeline] }
[Pipeline] // gitlabCommitStatus
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
Finished: FAILUR