xebialabs-community / xlr-xldeploy-plugin

The xlr-xldeploy-plugin is a XL Release plugin that allows to start a control task, start a deployment, migrate a deployment package to another server or get the latest version of an application on XL Deploy.
MIT License
9 stars 27 forks source link

Get All Versions improvements #83

Open istairbn opened 7 years ago

istairbn commented 7 years ago

2 changes to Get All Versions

  1. Recursion. Change to the root Client. Defaults to off (mimics current behaviour) but if active then it will recurse through directories. This covers situations where some foldershave a mixture of CIs and core.Directory objects.

  2. ListBox population. Currently the app can populate a List... but not a ListBox. This is a simple addition that prevents having a second script to simply populate a user input List box.

jdewinne commented 7 years ago

I'm not following on the recursion feature. If the input is an application id, how can there be a core.Directory under that level? As far as I know, an udm.Application can not have a core.Directory as a child. Or am i mistaken?

istairbn commented 7 years ago

If the input is udm.Application, then you are correct.

However, Get All Versions is powerful because it returns all children of anything - not just applications. So you can give it an environment and it’ll return the deployeds.

The recursion feature allows you to give it a core.Directory and it’ll return all top level CIs. For example, a structure set up thus:

Team Team/buisnessApp Team/anotherApp Team/dB/mySqlApp Team/dB/oracleApp

Targeting team with get all Versions recursive will return 4 Apps. I then populate a list box, the user selects an app they want. Now the user has selected an app, we run Get All versions again to get the version of what they want to Deploy.

Arguably I’m not using “Get all Versions” for its original purpose - but adding recursion and leaving it defaulting to false means it simply extends the capability to make it more functional whilst leaving default behaviour untouched.