Skip to content

Instantly share code, notes, and snippets.

@alexandreroman
Last active November 15, 2018 08:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexandreroman/176127372b28eb8c51ca4e71c4dc993f to your computer and use it in GitHub Desktop.
Save alexandreroman/176127372b28eb8c51ca4e71c4dc993f to your computer and use it in GitHub Desktop.
Downloading PKS from Pivotal Network using pivnet CLI

Downloading PKS from Pivotal Network using pivnet CLI

Install pivnet CLI:

$ wget -O pivnet github.com/pivotal-cf/pivnet-cli/releases/download/v0.0.55/pivnet-linux-amd64-0.0.55 && chmod +x pivnet && sudo mv pivnet /usr/local/bin

Login to pivnet:

$ pivnet login --api-token=$PIVNET_TOKEN

List PKS available versions, and select one version to download:

$ pivnet releases -p pivotal-container-service --format json | jq -r '.[].version'
1.2.1
1.2.1-RC1
1.2.0
1.2.0-Beta-2
1.2.0-Beta-1
1.1.0-rc3
1.1.0-rc2
1.1.0-rc1
1.1.x
1.0.x
$ PRODUCT_VERSION=1.2.1

Download the version:

$ PRODUCT_ID=`pivnet product-files -p pivotal-container-service -r $PRODUCT_VERSION --format json | jq -r '.[] | select(.name | contains("pivotal-container-service-")).id'`
$ pivnet download-product-files -p pivotal-container-service -r $PRODUCT_VERSION -i $PRODUCT_ID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment