Product Version Commands - project-ncl/pnc-cli GitHub Wiki
#Product Version Commands#
###create-product-version### Create a new ProductVersion.
#####Required Parameters#####
- Product ID: ID of the Product this ProductVersion should be associated with. Version: The version this ProductVersion denotes.
#####Optional Parameters#####
- Current Product Milestone ID (-cm / --current-product-milestone-id): ID of the ProductMilestone that should be marked as the current one.
- Product Releases (-pr / --product-releases): Space separated list of ProductRelease IDs that should be associated with this ProductVersion.
- Product Milestones (-pm / --product-milestones): Space separated list of ProductMilestones IDs that should be associated with this ProductVersion.
- Build Configuration Set IDs (-bc / --build-configuration-set-ids): Space separated list of BuildConfigurationSet IDs that should be associated with this ProductVersion.
[[thauser] [17:04:37] ~]$pnc create-product-version 1 2.9
{'build_configuration_sets': [],
'build_configurations': [],
'current_product_milestone_id': None,
'id': 3,
'product_id': 1,
'product_milestones': [],
'product_releases': [],
'version': '2.9'}
###get-product-version### Get a JSON payload of the given ProductVersion.
#####Required Parameters#####
- ProductVersion ID: ID of the ProductVersion to retrieve.
[[thauser] [17:00:23] ~]$pnc get-product-version 1
{'build_configuration_sets': [{'build_configuration_ids': [1, 2, 3],
'id': 1,
'name': 'Example Build Group 1',
'product_version_id': 1},
{'build_configuration_ids': [4],
'id': 2,
'name': 'Fabric Build Group',
'product_version_id': 1}],
'build_configurations': [],
'current_product_milestone_id': 1,
'id': 1,
'product_id': 1,
'product_milestones': [{'distributed_build_record_set_id': 1,
'download_url': None,
'end_date': None,
'id': 1,
'performed_build_record_set_id': 2,
'planned_end_date': None,
'product_release_id': 1,
'product_version_id': 1,
'starting_date': None,
'version': '1.0.0.Build1'}],
'product_releases': [{'download_url': None,
'id': 1,
'product_milestone_id': 1,
'product_version_id': 1,
'release_date': None,
'support_level': 'EARLYACCESS',
'version': '1.0.0.GA'}],
'version': '1.0'}
###list-product-versions### List all ProductVersions.
#####Optional Parameters#####
- Page size (-p / --page-size): The maximum amount of ProductVersions that will be returned per "page". Default 200.
- Sort (-s / --sort): RSQL query to define the order of returned ProductVersions
- Query (-q): RSQL query to filter returned results
[[thauser] [17:06:00] ~]$pnc list-product-versions
{'build_configuration_sets': [{'build_configuration_ids': [4],
'id': 2,
'name': 'Fabric Build Group',
'product_version_id': 1},
{'build_configuration_ids': [1, 2, 3],
'id': 1,
'name': 'Example Build Group 1',
'product_version_id': 1}],
'build_configurations': [],
'current_product_milestone_id': 1,
'id': 1,
'product_id': 1,
'product_milestones': [{'distributed_build_record_set_id': 1,
'download_url': None,
'end_date': None,
'id': 1,
'performed_build_record_set_id': 2,
'planned_end_date': None,
'product_release_id': 1,
'product_version_id': 1,
'starting_date': None,
'version': '1.0.0.Build1'}],
'product_releases': [{'download_url': None,
'id': 1,
'product_milestone_id': 1,
'product_version_id': 1,
'release_date': None,
'support_level': 'EARLYACCESS',
'version': '1.0.0.GA'}],
'version': '1.0'}
{'build_configuration_sets': [],
'build_configurations': [],
'current_product_milestone_id': None,
'id': 2,
'product_id': 1,
'product_milestones': [],
'product_releases': [],
'version': '2.8'}
{'build_configuration_sets': [],
'build_configurations': [],
'current_product_milestone_id': None,
'id': 3,
'product_id': 1,
'product_milestones': [],
'product_releases': [],
'version': '2.9'}
###update-product-version### Update an existing ProductVersion with new field values.
#####Required Parameters#####
- Product Version ID: ID of the ProductVersion to modify.
#####Optional Parameters#####
- Product ID (-pid / --product-id): ID of the Product with which this ProductVersion is associated.
- Version (-v / --version): Version denoted by this ProductVersion.
- Current Product Milestone ID (-cm / --current-product-milestone-id): ID of the ProductMilestone that should be marked as the current one.
- Product Releases (-pr / --product-releases): Space separated list of ProductRelease IDs that should be associated with this ProductVersion.
- Product Milestones (-pm / --product-milestones): Space separated list of ProductMilestones IDs that should be associated with this ProductVersion.
- Build Configuration Set IDs (-bc / --build-configuration-set-ids): Space separated list of BuildConfigurationSet IDs that should be associated with this ProductVersion.
[[thauser] [17:07:48] ~]$pnc update-product-version 3 -v 3.8
[[thauser] [17:10:14] ~]$pnc get-product-version 3
{'build_configuration_sets': [],
'build_configurations': [],
'current_product_milestone_id': None,
'id': 3,
'product_id': 1,
'product_milestones': [],
'product_releases': [],
'version': '3.8'}