Automating the Build & Deploy Process for Infor CRM

If you’re using a build server for continuous integration & deployment, you’ll be happy to know you can automate the build & deployment process for Infor CRM using command-line tools. Even if you’re not using a build server and would like to create some automated way to build & deploy, you’ll find these tools useful.

Imagine this scenario. You could create a process where your server pulls the master branch from a git repository, then builds the web platform and deploys the portals – all automatically. You wouldn’t need to do anything extra. All you have to do is merge whatever is production ready to the master branch and know that it’s all going to happen on it’s own. Sounds awesome, right? Let’s take a look at these command-line tools and how they work.

Automating the Build

There is a command-line tool called ModelUtility.exe that can be found in the SalesLogix installation folder. This utility takes the following parameters:

  • –build:{BuildAll|Build}
    Default:BuildAll, this determines whether it should only build what has changed vs building everything again. This is the equivalent of Build Web Platform in AA and Rebuild Web Platform (or CTRL+Build)
  • –type:{Interfaces|WebClasses}
    Default:Interfaces, this is the equivalent of building only Interfaces in AA vs Build Web Platform in AA (WebClasses means build the web platform)
  • –model:{path}
    This specifies the location of your model. This can be a folder path if you’re using an exported model or “VFS:\” if working from the VFS
  • –output:{path}
    This specifies the folder to use to generate the code files and compile from. This is really just a temporary build location, once the build is complete the DLLs are copied to the deployment folders in the model just as it does when you build from AA

Sample command line:

ModelUtility --build:BuildAll --type:WebClasses --model:C:\SLX\Model --output:C:\BuildOutput

Automating the Deployment

There is a command-line tool called DeploymentUtility.exe that can be found in the SalesLogix installation folder. This utility takes the following parameters:

  • –deployment:{path}
    This is the location/path you are deploying to, such as C:\inetpub\wwwroot
  • –output:{path}
    The location where it can build or generate web items, this is temp path for the build only
  • –model:{path}
    Specifies the location of your model. This can be a folder path if you’re using an exported model or “VFS:\” if working from the VFS
  • –conn:{connection string}
    This is the Saleslogix connection string. Optionally, you can out the connection string in the DeploymentUtility.config file as well – which is a far better route than adding to the command-line
  • –portalname:{string}
    Default SlxClient, this specifies which portal you are deploying. You can specify, sdata, slxmobile, etc. Any of the portals in AA
  • –precompile:{+|-}
    Indicates whether the deployed portal should be precompiled or not
  • –binaries:{+|-}
    Indicates whether the portal should be rebuilt first before deployment. If you use this option you can avoid the separate build using the ModelUtility above
  • –deploymentname:{string}
    You can specify the name of a deployment record in AA here and it will use that configured deployment’s details (path, whether to precompile, the portals for the deployment, etc). This is a great option since a lot of the other options are all defined in this deployment record and it will cut down on the length of the command-line

Sample command line (connection defined in DeploymentUtility.config):

DeploymentUtility --deploymentname:"Core Portals"

or

DeploymentUtility --deployment:C:\inetpub\wwwroot\slxclient --model:C:\SLX\Model --output:C:\BuildOutput --portalname:SlxClient --precompile:- --binaries:-

Also, for the DeploymentUtility, if you’re deploying from the file system (and not the VFS), make sure you’re on 8.3 Update 07 or higher since it fixed and issue with this tool (INFORCRM-14375: DeploymentUtility.exe will not deploy correctly from a local file system model)

As far as continuous integration goes, that’s just a matter of creating your tests for everything, which means you have to develop a certain way, meaning not build code directly in AA and instead use external assembles. You can’t exactly unit test code written in AA, but as long as you’re using external assemblies then you can create unit tests normally. I’ve written several articles on using external assemblies for business rules etc that you can take a look at.

Good luck.

ABOUT THE AUTHOR

Ryan Farley

Ryan Farley is the Director of Development for Customer FX and creator of slxdeveloper.com. He’s been blogging regularly about SalesLogix since 2001 and believes in sharing with the community. He loves C#, Javascript, Python, web development, open source, and Linux. He also loves his hobby as an amateur filmmaker.

3 Comments

  1. Hi Ryan,
    The deploymentutility also build, so if you want to use automatic build and deploy it is enough to use the deployment utility.

    Reply
    • Hi Alexander,

      That is correct, it’s mentioned above with the “–binaries” parameter:
      “Indicates whether the portal should be rebuilt first before deployment. If you use this option you can avoid the separate build using the ModelUtility above”

      However, I do like to separate the build from the deployment either way. Especially if you’re automating things on a build server, it allows you to separate problems with the build from problems with the deployment.

      Ryan

  2. Great article, I am glad people are getting use out of these tools.

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe To Our Newsletter

Join our mailing list to receive the latest Infor CRM (Saleslogix) news and product updates!

You have Successfully Subscribed!