Skip to main content

This post is from the XebiaLabs blog and has not been updated since the original publish date.

Last Updated May 11, 2015 — DevOps Expert

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:

Screen Shot 2015-05-12 at 2.30.39 PMWe can then double click on the "folder1" object to reveal the properties of this object and make changes before we deploy them.  Screen Shot 2015-05-12 at 2.31.07 PMFor example we can change the "Target Path" for the file from "/tmp/masterFolder" to "/tmp/blog/test" as follows:  Screen Shot 2015-05-12 at 2.31.34 PMAfter doing the deployment we will notice that the files are deployed to the new folder.  Screen Shot 2015-05-12 at 2.32.21 PMSo 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.  Screen Shot 2015-05-12 at 2.44.01 PMLet'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:  Screen Shot 2015-05-12 at 2.52.51 PMAs 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.  

More from the Blog

View more
Feb 22, 2021

Reckoning DevOps’ role in the enterprise value stream

If you’re a software or digital solutions company, you may use DevOps ...
Read More
Feb 10, 2021

Customer spotlight: Schneider avoiding bumps in the road with DevOps adoption

Everyone wants to deliver software faster and more reliably. Companies ...
Read More
Jan 06, 2021

How testing automation can build a culture of QA while accelerating continuous delivery

An organization’s level of automated test coverage is quickly emerging ...
Read More
Jul 30, 2020

Part 2: Is Technology Slowing Down Your Digital Transformation?

In part one of this post, we shared insights from Andreas Prins’ webin ...
Read More
Contact Us