This repository was archived by the owner on Nov 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
Project Commands
Tom Hauser edited this page Mar 3, 2016
·
7 revisions
###create-project### #####Required Parameters#####
- Name: Name for the new Project
#####Optional Parameters#####
- Description (-d / --description): Detailed description of the Project
- Project URL (-p / --project-url): SCM URL for the Project
- Issue Tracker URL (-i / --issue-tracker-url): Link to the Project's issue tracking system
- License ID (-l / --license-id): The License which this Project is under. Must exist within PNC
[[thauser] [15:14:35] dv-installer (master)]$pnc create-project 'testerino' -d 'test project' -p https://github.com/thauser/pnc-cli -i http://jira.somedomain.com -l 1
{'configuration_ids': [],
'description': 'test project',
'id': 9,
'issue_tracker_url': 'http://jira.somedomain.com',
'license_id': 1,
'name': 'testerino',
'project_url': 'https://github.com/thauser/pnc-cli'}
###delete-project### Removes a Project from PNC.
#####Required Parameters##### This command requires one of the following (not both):
- ID (-i / --id): ID of the Project to delete
- Name (-n / --name): Name of the Project to delete
[[thauser] [15:29:37] dv-installer (master)]$pnc delete-project -i 9
[[thauser] [15:30:21] dv-installer (master)]$pnc get-project -i 9
(404)
Reason: Not Found
###update-project### Updates a Project's fields with new values.
#####Required Parameters#####
- ID: Project ID to modify
#####Optional Parameters#####
- Description (-d / --description): New detailed description of the Project
- Project URL (-p / --project-url): New SCM URL for the Project
- Issue Tracker URL (-i / --issue-tracker-url): New link to the Project's issue tracking system
- License ID (-l / --license-id): New License which this Project is under. Must exist within PNC
[[thauser] [15:32:32] dv-installer (master)]$pnc update-project 10 -p http://newproject.com -d 'updated description'
[[thauser] [15:32:38] dv-installer (master)]$pnc get-project -i 10
{'configuration_ids': [],
'description': 'updated description',
'id': 10,
'issue_tracker_url': 'http://jira.somedomain.com',
'license_id': 1,
'name': 'testerino',
'project_url': 'http://newproject.com'}
###get-project### Get a JSON payload containing the specified Project.
#####Required Parameters##### This command requires one of the following (but not both):
- ID (-i / --id): ID of the Project to retrieve
- Name (-n / --name): Name of the Project to retrieve
[[thauser] [15:34:15] dv-installer (master)]$pnc get-project -i 10
{'configuration_ids': [],
'description': 'updated description',
'id': 10,
'issue_tracker_url': 'http://jira.somedomain.com',
'license_id': 1,
'name': 'testerino',
'project_url': 'http://newproject.com'}
###list-projects### List all Projects in this instance of PNC.
#####Optional Parameters#####
- Page size (-p / --page-size): The maximum amount of Projects that will be returned per "page". Default 200.
- Sort (-s / --sort): RSQL query to define the order of returned Projects
- Query (-q): RSQL query to filter returned results
[[thauser] [15:34:48] dv-installer (master)]$pnc list-projects
{'configuration_ids': [1],
'description': 'Example Project for Newcastle Demo',
'id': 1,
'issue_tracker_url': None,
'license_id': None,
'name': 'Project Newcastle Demo Project 1',
'project_url': 'https://github.com/project-ncl/pnc'}
{'configuration_ids': [2],
'description': 'JBoss Modules Project',
'id': 2,
'issue_tracker_url': 'https://issues.jboss.org/browse/MODULES',
'license_id': None,
'name': 'JBoss Modules',
'project_url': 'https://github.com/jboss-modules/jboss-modules'}
{'configuration_ids': [3],
'description': 'JavaEE Servlet Spec API',
'id': 3,
'issue_tracker_url': 'https://issues.jboss.org/browse/JBEE',
'license_id': None,
'name': 'JBoss JavaEE Servlet Spec API',
'project_url': 'https://github.com/jboss/jboss-servlet-api_spec'}
...