-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get All Versions improvements #83
base: master
Are you sure you want to change the base?
Conversation
Get All Versions task needs two extra features: - Add recursion (allows it to recurse through child directories, defaults to False, which is standard behaviour - Populate a list box. Allows users to get all versions and add to a list box
Allows Get All Versions to complete a list box rather than a list
get_all_package_version has the recurse option, allowing it to search through child directories
I'm not following on the recursion feature. If the input is an application id, how can there be a |
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 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about leaving GetAllVersions
intact, and making an additional task GetChildConfigurationItems
that does what you want. They can both share the same code, but that way the recurse
doesn't need to be present on GetAllVersions
.
description="If True, the Task will fail if the CI doesn't exist" default="false"/> | ||
<property name="throwOnFail" category="input" kind="boolean" label="Throw on Fail" description="If True, the Task will fail if the CI doesn't exist" default="false"/> | ||
<property name="recurse" category="input" kind="boolean" label="Recursive" description="If True, recurses through child directories" default="false"/> | ||
<property name="target_list_box" category="input" kind="string" label="List Box" description="If you wish to populate a List Box, provide the existing release variable name here (without ${ or })"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this not be an output property?
2 changes to Get All Versions
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.
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.