cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous Integration with jenkins fails

UdayArikatla
Level 4
we are trying to integrate the blueprism releases to CI tool Jenkins using command line export param "C:\Program Files\Blue Prism Limited\Blue Prism Automate\AutomateC.exe" /sso /exportpackage   /release When we execute the above  command through cmd it work fine. But we run above command through Jenkins it fails with the exception details mentioned below,   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 AutomateC.AutomateC.ReportProgress(Int32 perc, Object msg)    at BluePrism.BPCoreLib.clsProgressMonitor.OnProgressChanged(Int32 value, Object data)    at BluePrism.AutomateAppCore.clsRelease.WriteXmlHead(XmlWriter writer)    at BluePrism.AutomateAppCore.PackageComponent.ToXml(XmlWriter writer)    --- End of inner exception stack trace ---    at BluePrism.AutomateAppCore.PackageComponent.ToXml(XmlWriter writer)    at BluePrism.AutomateAppCore.clsRelease.Export(Stream stream, clsProgressMonitor mon)    at BluePrism.AutomateAppCore.clsRelease.Export(FileInfo file, Boolean compress, clsProgressMonitor mon)    at AutomateC.AutomateC.Run(String[] args)     Attached a screenshot for more details. Need assistance on how to integrate blueprism releases with the Jenkins or anyother CI tool.   Thanks Uday
7 REPLIES 7

John__Carter
Staff
Staff
I recommend raising a support ticket Uday.

MiteshDasani
Level 3
Hi Uday, The way to fix this error is to not use windows batch commands and instead use powershell command in jenkins.   sample powershell code: Start-Process ""C:\Program Files\Blue Prism Limited\Blue Prism Automate\automatec.exe"" -Wait -workingdirectory ""C:\BPBuild"" -ArgumentList ""/dbconname Dev /user /exportpackage PackageTest""    Thanks, Mitesh

HIMAKOMMINENI
Level 2
Hi, IS this error message resolved for you using powershell? I get the same message running powershell commands to export. Any help is appreciated   Thank you

+1: I also have the same issue. By using PowerShell ISE it fails. When I use windows command line it works properly. I tried to integrate the command line it into my PS script by using cmd.exe /c ""..."" or cmd.exe /k ""..."" but it returns  the same error message as below. Does anyone have at least a temporary workaround?  at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)    at System.Console.GetBufferInfo(Boolean throwOnNoConsole, Boolean& succeeded)    at AutomateC.AutomateC.ReportProgress(Int32 perc, Object msg)    at BluePrism.BPCoreLib.clsProgressMonitor.OnProgressChanged(Int32 value, Object data)    at BluePrism.AutomateAppCore.clsRelease.WriteXmlHead(XmlWriter writer)    at BluePrism.AutomateAppCore.PackageComponent.ToXml(XmlWriter writer)    --- End of inner exception stack trace ---    at BluePrism.AutomateAppCore.PackageComponent.ToXml(XmlWriter writer)    at BluePrism.AutomateAppCore.clsRelease.Export(Stream stream, clsProgressMonitor mon)    at BluePrism.AutomateAppCore.clsRelease.Export(FileInfo file, Boolean compress, clsProgressMonitor mon)    at AutomateC.AutomateC.Run(String[] args)

BhagavathsinghR
Level 3

I have successfully implemented with either using windows cmd or python as build steps.

Automatec doesnt work in powershell.



------------------------------
Bhagavathsingh Raamsingh
Senior Administrator
Wipro
America/New_York
------------------------------

AutomateC does work in PowerShell. What causes you to say it doesn't?

------------------------------
Dave Morris
3Ci @ Southern Company
Atlanta, GA
------------------------------
Dave Morris 3Ci at Southern Company Atlanta, GA

The challenge is when you try to execute AutomateC from powershell using Start-Process.   If you are doing something with /exportpackage AutomateC needs to be able to stream the results of the operation to the command window.   From what I can tell this is an issue when running with powershell.  Which is why we keep getting the Invalid Handle exception.  In this example the name of the release I'm trying to Export is EFT_012720_174239.   In the UI I can see the release was created under the correct package just as expected.  The problem is the actual EFT_012720_174239.bprelease file was never created due to the error.   Since I was trying to do this as a part of some CI/CD Setup Most of my powershell script is around selecting the package, collecting credentials and generating a unique release name based on the selected package and the current time.   If I take the command that is generated from the rest of the script and just paste it into a command window it executes perfectly.   See the Exception Below. 


Error processing action: exportpackage.
BluePrism.BPCoreLib.BluePrismException: Failed writing XML for type: releaseout; ID: ; Name: EFT_012720_174239; Error message: The handle is invalid.
---> System.IO.IOException: The handle is invalid.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.Console.SetCursorPosition(Int32 left, Int32 top)
at AutomateC.AutomateC.o(Int32 aq, Object ar)
at BluePrism.BPCoreLib.clsProgressMonitor.OnProgressChanged(Int32 value, Object data)
at BluePrism.AutomateAppCore.clsRelease.WriteXmlHead(XmlWriter writer)
at BluePrism.AutomateAppCore.PackageComponent.ToXml(XmlWriter writer)
--- End of inner exception stack trace ---
at BluePrism.AutomateAppCore.PackageComponent.ToXml(XmlWriter writer)
at BluePrism.AutomateAppCore.clsRelease.Export(Stream stream, clsProgressMonitor mon)
at BluePrism.AutomateAppCore.clsRelease.Export(FileInfo file, Boolean compress, clsProgressMonitor mon)
at AutomateC.AutomateC.j(String[] s)

------------------------------
Jessie Brooks
------------------------------