Product Milestone Commands - project-ncl/pnc-cli GitHub Wiki

#Product Milestone Commands#

###create-milestone### Create a new Product Milestone. Requires an existing Product Version.

#####Required Parameters#####

  • Product Version ID: ProductVersion this ProductMilestone should be under.
  • Version: Version for this ProductMilestone. Version will be appended to the parent ProductVersion's version. Example: ProductVersion.version = 1.1, ProductMilestone.version = .1.GA, Final version = 1.1.1.GA.
  • Starting Date: Start date for this ProductMilestone.
  • Planned release date: Planned release date for this ProductMilestone.
[[thauser] [18:57:57] ~]$pnc create-milestone 3 1.GA 2015-01-01 2017-01-01
{'distributed_build_record_set_id': 6,
 'download_url': None,
 'end_date': None,
 'id': 3,
 'performed_build_record_set_id': 7,
 'planned_end_date': None,
 'product_release_id': None,
 'product_version_id': 3,
 'starting_date': '2014-12-31',
 'version': '3.8.1.GA'}
[[thauser] [18:58:12] ~]$pnc get-product-version 3
{'build_configuration_sets': [],
 'build_configurations': [],
 'current_product_milestone_id': None,
 'id': 3,
 'product_id': 1,
 'product_milestones': [{'distributed_build_record_set_id': 6,
                         'download_url': None,
                         'end_date': None,
                         'id': 3,
                         'performed_build_record_set_id': 7,
                         'planned_end_date': None,
                         'product_release_id': None,
                         'product_version_id': 3,
                         'starting_date': '2014-12-31',
                         'version': '3.8.1.GA'}],
 'product_releases': [],
 'version': '3.8'}

Note: The date fields are not set correctly, as one can see from the above JSON.

###get-milestone### Retrieve a JSON payload about a specified ProductMilestone.

#####Required Parameters#####

  • Product Milestone ID: The ID of the ProductMilestone to retrieve.
[[thauser] [19:01:49] ~]$pnc get-milestone 3
{'distributed_build_record_set_id': 6,
 'download_url': None,
 'end_date': None,
 'id': 3,
 'performed_build_record_set_id': 7,
 'planned_end_date': None,
 'product_release_id': None,
 'product_version_id': 3,
 'starting_date': '2014-12-31',
 'version': '3.8.1.GA'}

###update-milestone### Update the specified ProductMilestone fields with new values.

#####Required Parameters#####

  • Product Milestone ID: The ProductMilestone to update
  • Version: New version for the ProductMilestone.
  • Start date: New start date for the ProductMilestone.
  • Release date: New release date for the ProductMilestone.

###list-milestones### List all ProductMilestones.

#####Optional Parameters#####

  • Page size (-p / --page-size): The maximum amount of ProductMilestones that will be returned per "page". Default 200.
  • Sort (-s / --sort): RSQL query to define the order of returned ProductMilestones
  • Query (-q): RSQL query to filter returned results
[[thauser] [19:05:03] ~]$pnc list-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'}
{'distributed_build_record_set_id': 6,
 'download_url': None,
 'end_date': None,
 'id': 3,
 'performed_build_record_set_id': 7,
 'planned_end_date': None,
 'product_release_id': None,
 'product_version_id': 3,
 'starting_date': '2014-12-31',
 'version': '3.8.1.GA'}

###list-milestones-for-version### List all ProductMilestones associated with a specified ProductVersion.

#####Required Parameters#####

  • Product Version ID: ID of the ProductVersion to list ProductMilestones for.

#####Optional Parameters#####

  • Page size (-p / --page-size): The maximum amount of ProductMilestones that will be returned per "page". Default 200.
  • Sort (-s / --sort): RSQL query to define the order of returned ProductMilestones
  • Query (-q): RSQL query to filter returned results
[[thauser] [19:07:04] ~]$pnc list-milestones-for-version 1
{'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'}