Skip to content

anynines/cf_service_jumper_cli_plugin-OLD

Repository files navigation

Cf Service Jumper CLI Plugin

This CF cli plugin uses the CF Service Jumper service to create, delete and list forwards to services.

Usage

cf create-forward SERVICE_NAME
cf delete-forward SERVICE_NAME FORWARD_ID
cf list-forwards SERVICE_NAME
# show custom service jumper endpoint; determines endpoint automatically if blank
cf forward-api

# set custom service jumper endpoint
cf forward-api https://my-custom-service-jumper-endpoint.com

# remove custom service jumper endpoint
cf forward-api -d

Installation

Download the latest release for your platform from the release page. You must have read and execute permissions to the plugin binary file. Install the plugin using the following command:

cf install-plugin cf_service_jumper_cli_plugin_YOUR_OS_AND_ARCH

If you want to remove the plugin, execute:

cf uninstall-plugin CfServiceJumperPlugin

Development

Prerequisites

go get -u github.com/kardianos/govendor

Build, Install & Uninstall

cf uninstall-plugin CfServiceJumperPlugin  
go build -o CfServiceJumperPlugin
cf install-plugin CfServiceJumperPlugin  

Testing

We're using ginko as testing framework.

go test

Release

Build the release binaries and output to directory out/.

./bin/build.sh

Create a GitHub token and set it as the env variable GITHUB_TOKEN.

export GITHUB_TOKEN=...

Increase version in file VERSION if required.

Create a new release with version VERSION on the release page.

./bin/release.sh