Using the XL Deploy CLI to Update Properties Prior to Deployment
Have you ever wondered if you could modify the properties of one of the objects you are deploying just before the actual deployment from a CLI script? You can make last minute changes like this in the UI just before deployment. We always tell people that anything you can do from the UI can be done from the CLI. Let's first see what this looks like from the UI. Let's say we have an environment "DEV" and an application "unixFile" as follows:We can then double click on the "folder1" object to reveal the properties of this object and make changes before we deploy them. For example we can change the "Target Path" for the file from "/tmp/masterFolder" to "/tmp/blog/test" as follows: After doing the deployment we will notice that the files are deployed to the new folder. So that is fine, but what we want to do is the same thing with a CLI script. In our script we will follow much the same process. Below is a CLI script to do the same thing. Let's look at what is happening here. First we set some variables for the application and environment that we are going to be deploying to. Then we start the deployment and generate the mapping. This is the same as our first step above. Now, before we actually kick off the deployment we will modify the "Target Path" of our deployed. Once that is done we can create the deployment tasks and start the deployment. To verify that our deployment went as expected we can have a look at the deployment in the UI under reports as follows: As you can see from the deployment log we were able to change the final deployment path. You can use this process for changing the properties of any deployed during the CLI.