Question
Optum Inc
US
Last activity: 28 Feb 2019 23:16 EST
How to deploy project from command line.
our requirement to make deployment files from command line and mention path as argument in command where we want deployment files.
C:\>"openspan command to make deployment files" "project name -full path" "path where need deployment files"
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Westpac Banking Corporation
AU
PFA screenshot.
Pegasystems Inc.
US
What you are asking is not available as part of the product. If you are a good detective though, you can log the build and deploy process and figure out how to do it in a shell script. The issue of course is that the deployment command (OSD.exe) takes a large number of parameters that come from the .osproj file. You will need to determine these parameters for each of your projects.
Optum Inc
US
could you provide documentation on how parameters for osd.exe being use. We tried osd.exe but unable to find parameter that determine which configuration file setting to deploy with.
Pegasystems Inc.
US
Sorry, but this is not documented for use. I only suggest that you can do your own detective work to figure it out if you so desire.
Westpac Banking Corporation
AU
Using below c# code, you can pass project path as argument.
ProcessStartInfo psi = new ProcessStartInfo();
psi.FileName = "runtime path";
psi.Arguments = "Project=" + solutionPath;
Process.Start(psi);
Pegasystems Inc.
US
Sorry, but OSD has an extensive set of parameters required. The previous comment will not work for what the original poster requested.
Unum
US
If you do a deployment from Visual Studio for your project, you can copy the OSD command that is shown in the Output window in Visual Studio. I did one for a dummy project and modified it slightly. Here it is.
If you do a deployment from Visual Studio for your project, you can copy the OSD command that is shown in the Output window in Visual Studio. I did one for a dummy project and modified it slightly. Here it is.
"%OPENSPAN_APPLICATION_PATH%OSD.exe" /NoLogo /NoCache /PackageFile="Project1.OpenSpan" /PackagePath="C:\Projects\Project1\Project1\bin\Debug" /ProjectFile="C:\Projects\Project1\Project1\Project1.osproj" /ProjectAssembly="bin\Debug\Project1.dll" /ConfigurationName="Debug" /CachePath="C:\Projects\Project1\Project1\obj\Debug" /Translators /BuildReferences="RuntimeConfig.xml" /CreatedWith="Deployment" /Assemblies /References="C:\Program Files\OpenSpan\OpenSpan Plug-in for Microsoft Visual Studio 2015\Interop.FREngine.dll;C:\Program Files\OpenSpan\OpenSpan Plug-in for Microsoft Visual Studio 2015\log4net.dll;C:\Program Files\OpenSpan\OpenSpan Plug-in for Microsoft Visual Studio 2015\OpenSpan.ApplicationFramework.dll;C:\Program Files\OpenSpan\OpenSpan Plug-in for Microsoft Visual Studio 2015\OpenSpan.Automation.dll;C:\Program Files\OpenSpan\OpenSpan Plug-in for Microsoft Visual Studio 2015\OpenSpan.Common.dll;C:\Program Files\OpenSpan\OpenSpan Plug-in for Microsoft Visual Studio 2015\OpenSpan.Controls.dll;C:\Program Files\OpenSpan\OpenSpan Plug-in for Microsoft Visual Studio 2015\OpenSpan.dll;C:\Program Files\OpenSpan\OpenSpan Plug-in for Microsoft Visual Studio 2015\OpenSpan.Events.dll;C:\Program Files\OpenSpan\OpenSpan Plug-in for Microsoft Visual Studio 2015\OpenSpan.Interactions.Controls.dll;C:\Program Files\OpenSpan\OpenSpan Plug-in for Microsoft Visual Studio 2015\OpenSpan.Interactions.dll;C:\Program Files\OpenSpan\OpenSpan Plug-in for Microsoft Visual Studio 2015\OpenSpan.NativeInterop.dll;C:\Program Files\OpenSpan\OpenSpan Plug-in for Microsoft Visual Studio 2015\OpenSpan.Recording.dll;C:\Program Files\OpenSpan\OpenSpan Plug-in for Microsoft Visual Studio 2015\OpenSpan.Runtime.Core.dll;C:\Program Files\OpenSpan\OpenSpan Plug-in for Microsoft Visual Studio 2015\OpenSpan.Script.dll;C:\Program Files\OpenSpan\OpenSpan Plug-in for Microsoft Visual Studio 2015\OpenSpan.Threading.dll;C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Core.dll;C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Data.dll;C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.dll;C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Drawing.dll;C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Xml.dll;"
The only changes I made was replacing the full path to C:\Program Files\OpenSpan\...\OSD.exe with the environment variable %OPENSPAN_APPLICATION_PATH%OSD.exe. I also removed the /NonVerbose flag. You could also identify other things to replace like the base path where your projects are located if you have those broken out into environmental variables.
Keep in mind that this will obviously only work for my dummy project. You can copy the one for your project's deployment output and use it.
Something else to keep in mind: if you make any changes like adding references or adding misc. deployment files then the OSD arguments will change since they are specified manually as arguments to the OSD command. Adding/removing configurations may also change it. Using a custom OSD command won't work very well if you are using it as part of a CI/CD pipeline because the arguments will change as you an Automation is developed. It will also modify the .OSProj file (it increments the version number), so if the deployment is something you will officially use you would want to check that change into your version control after the deployment succeeds.
A recommendation for Pega: It seems like most of the arguments passed into the OSD tool could be derived from the .osproj file. I would be grateful if Pega released a command line tool or modified OSD.exe to derive most of this information (like the References, Translators, configs) so we could make deployment scripts that would be more portable and robust.
Flex
IN
Our project is having separate configuration.os file. Someone here, Please suggest how to incorporate the configuration file in above command or Is there anyother better way to achieve the command line deployment with configuration.os file
Thanks in advance.
-
Pooja Gadige
Pegasystems Inc.
US
You could try setting the ConfigurationName= property?