CLI to interact with Pivotal Network
Clone or download
pnikonowicz fix build
not sure if this will do it, but this line is preventing tests from running locally

[#161922622]
Latest commit 349ac34 Nov 13, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
auth Add login command - persist login information to file. Nov 28, 2016
bin fix build Nov 13, 2018
commands Clarify which flags need to be passed in error msg Nov 13, 2018
docs Clarified text on download-product-file command help method for downl… Aug 27, 2018
errorhandler Render successful messages in green. [#135532249] Dec 8, 2016
filter Removed unused variables from tests, due to golang1.11 compilation Aug 28, 2018
gp add ability to download files inside file groups Jun 5, 2018
printer Add login command - persist login information to file. Nov 28, 2016
rc RC yaml marshalling takes place in rc, not filesystem package. [#1325… Dec 7, 2016
ui Render successful messages in green. [#135532249] Dec 8, 2016
version Migrate code from github.com/pivotal-cf/go-pivnet. [#132365411] Oct 17, 2016
.gitignore Add pivnet-cli docs May 15, 2018
CONTRIBUTING.adoc Add CONTRIBUTING.adoc Oct 20, 2016
LICENSE Add LICENSE and NOTICE. [#132365411] Oct 17, 2016
NOTICE Add LICENSE and NOTICE. [#132365411] Oct 17, 2016
PULL_REQUEST_TEMPLATE.md Update Pull Request Template to reflect that there is no develop branch Oct 19, 2018
README.md Update README.md with correct path to test binary Nov 13, 2018
go.mod adding go modules Oct 18, 2018
go.sum adding go modules Oct 18, 2018
init_test.go Revert "move acceptance to its own directory for now" Mar 15, 2018
main.go Support writing man page. Dec 29, 2016
main_test.go added test for refresh token Jul 31, 2018

README.md

Pivnet CLI

Interact with Pivotal Network from the command-line.

Installing

Binaries for various operating systems are provided with each release on the releases page.

Install for OSX via homebrew as follows:

brew install pivotal/tap/pivnet-cli

To install on linux: download the latest binary (see latest release) and ensure the file is executable and on the path.

Usage

Using the Pivnet CLI requires a valid Pivotal Network API token or UAA Refresh Token.

Refer to the official docs for more details on obtaining a Pivotal Network API token.

Example usage:

$ pivnet login --api-token='my-api-token'
$ pivnet products

+-----+------------------------------------------------------+--------------------------------+
| ID  |                         SLUG                         |              NAME              |
+-----+------------------------------------------------------+--------------------------------+
|  60 | elastic-runtime                                      | Pivotal Cloud Foundry Elastic  |
|     |                                                      | Runtime                        |
+-----+------------------------------------------------------+--------------------------------+

$ pivnet r -p elastic-runtime -r 2.3.1 --format json \
  | jq '{"id": .id, "release_date": .release_date, "release_type": .release_type}'

{
  "id": 196729,
  "release_date": "2018-10-05",
  "release_type": "Security Release"
}

Developing

Prerequisites

A valid install of golang >= 1.6 is required.

Dependencies

Dependencies are vendored in the vendor directory, according to the golang 1.5 vendor experiment.

No action is required to fetch the vendored dependencies.

Running the tests

Install the ginkgo executable with:

go get -u github.com/onsi/ginkgo/ginkgo

The tests require a valid Pivotal Network API token and host.

Refer to the official docs for more details on obtaining a Pivotal Network API token.

It is advised to run the acceptance tests against the Pivotal Network integration environment endpoint i.e. HOST='https://pivnet-integration.cfapps.io'.

Run the tests with the following command:

API_TOKEN=my-token \
HOST='https://pivnet-integration.cfapps.io' \
./bin/test

Contributing

Please make all pull requests to the master branch, and ensure the tests pass locally.

Project management

The CI for this project can be found here and the scripts can be found in the pivnet-resource-ci repo.

The roadmap is captured in Pivotal Tracker.