deploycloud

command module
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2015 License: Apache-2.0 Imports: 2 Imported by: 0

README

deploycloud

cf plugin for using a github remote for managing cf app deployments

wercker status

Coverage Status

installation from release binaries

On OSX using release binaries

$ wget -O $GOPATH/bin/deploycloud https://github.com/xchapter7x/deploycloud/releases/download/v1.0.1/deploycloud_darwin_amd64
$ cf install-plugin $GOPATH/bin/deploycloud

On Linux using release binaries

$ wget -O $GOPATH/bin/deploycloud https://github.com/xchapter7x/deploycloud/releases/download/v1.0.1/deploycloud_linux_amd64
$ cf install-plugin $GOPATH/bin/deploycloud

On Windows using release binaries

#in your browser download https://github.com/xchapter7x/deploycloud/releases/download/v1.0.1/deploycloud_windows_amd64.exe and place it in $GOPATH/bin/deploycloud.exe

$ cf install-plugin $env:GOPATH/bin/deploycloud.exe

installation using go get

*On nix using go get

$ go get github.com/xchapter7x/deploycloud
$ cf install-plugin $GOPATH/bin/deploycloud

On Windows using go get

$ go get github.com/xchapter7x/deploycloud
$ cf install-plugin $env:GOPATH/bin/deploycloud.exe

Usage

available args

	--list "list apps available in config file (defaults to false)"
	--run "run the selected deployment (takes a string value)"
	--show "show the selected deployment's details (takes a string value)"
	--config "path to remote config file (takes a string value & has default `config.yml`"
	--org "the target org in github (takes a string value)"
	--repo "the target repo in github (takes a string value)"
	--branch "the target branch in your github repo (takes a string value)"
	--url "the target github base url (takes a string value & defaults to https://raw.github.com/)"
	--token "the oauth token for your github account (uses GH_TOKEN Env var by default)"
	--cfuser "the cf username to use when logging in to the deployment target (uses CF_USER Env var by default)"
	--cfpass "the cf user's password to use when logging in to the deployment target (uses CF_PASS Env var by default)"

sample calls

#List available apps to deploy
$ cf cloud-deploy --list --org xchapter7x --repo deploycloud --branch master

#Show details of deployment
$ cf cloud-deploy --show myapp.development --org xchapter7x --repo deploycloud --branch master

#Run an available application deployment
$ cf cloud-deploy --run myapp.development --org xchapter7x --repo deploycloud --branch master

Env Var powered

by setting the following env vars you can avoid the need to pass them into the cli

`GH_TOKEN` - env var name to store your github oauth token
`CF_USER` - env var name to store your cf user
`CF_PASS` - env var name to store your cf user's password

Repo Structure

By default the plugin will look for a config.yml file in the root of the given repo. You can overwrite this default by passing the --config flag to the plugin with the relative path of the config in the repo

Sample Config Repo

** Sample repo to use as reference https://github.com/xchapter7x/deployments **

Config file Structure

Sample:

---
applications:
  #an application record
  myapp1:
    #list of deployments associated with this app
    deployments:
      # one of the deployement details records
      - name: development #name of deployment
        url: api.pivotal.io #url to target during push
        org: myorg # org to target during push
        space: thespace # space to target during push
        path: myapp1/development #path to desired manifest (relative to the root of this repo)
        push_cmd: cf push appname -i 2 #push command to execute (note: the above manifest will be used via a added `-f`, so dont add it here)
      
      # another deployment definition for the myapp1 application
      - name: production
        url: api.pivotal.io
        org: myorg
        space: prodspace
        path: myapp1/production
        push_cmd: cf push-zdd appname_prod -i 8
  myotherapp:
    deployments:
      - name: dev
        url: api.other.pivotal.io
        org: otherorg
        space: otherspace
        path: myotherapp/development
        push_cmd: cf push appname_dev -i 2

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Godeps
_workspace/src/github.com/cloudfoundry/cli/plugin/fakes
This file was generated by counterfeiter
This file was generated by counterfeiter
_workspace/src/github.com/cloudfoundry/cli/plugin/rpc/fakes
This file was generated by counterfeiter
This file was generated by counterfeiter
_workspace/src/github.com/google/go-github/github
Package github provides a client for using the GitHub API.
Package github provides a client for using the GitHub API.
_workspace/src/github.com/google/go-querystring/query
Package query implements encoding of structs into URL query parameters.
Package query implements encoding of structs into URL query parameters.
_workspace/src/github.com/onsi/ginkgo
Ginkgo is a BDD-style testing framework for Golang The godoc documentation describes Ginkgo's API.
Ginkgo is a BDD-style testing framework for Golang The godoc documentation describes Ginkgo's API.
_workspace/src/github.com/onsi/ginkgo/config
Ginkgo accepts a number of configuration options.
Ginkgo accepts a number of configuration options.
_workspace/src/github.com/onsi/ginkgo/ginkgo
The Ginkgo CLI The Ginkgo CLI is fully documented [here](http://onsi.github.io/ginkgo/#the_ginkgo_cli) You can also learn more by running: ginkgo help Here are some of the more commonly used commands: To install: go install github.com/onsi/ginkgo/ginkgo To run tests: ginkgo To run tests in all subdirectories: ginkgo -r To run tests in particular packages: ginkgo <flags> /path/to/package /path/to/another/package To pass arguments/flags to your tests: ginkgo <flags> <packages> -- <pass-throughs> To run tests in parallel ginkgo -p this will automatically detect the optimal number of nodes to use.
The Ginkgo CLI The Ginkgo CLI is fully documented [here](http://onsi.github.io/ginkgo/#the_ginkgo_cli) You can also learn more by running: ginkgo help Here are some of the more commonly used commands: To install: go install github.com/onsi/ginkgo/ginkgo To run tests: ginkgo To run tests in all subdirectories: ginkgo -r To run tests in particular packages: ginkgo <flags> /path/to/package /path/to/another/package To pass arguments/flags to your tests: ginkgo <flags> <packages> -- <pass-throughs> To run tests in parallel ginkgo -p this will automatically detect the optimal number of nodes to use.
_workspace/src/github.com/onsi/ginkgo/internal/remote
Aggregator is a reporter used by the Ginkgo CLI to aggregate and present parallel test output coherently as tests complete.
Aggregator is a reporter used by the Ginkgo CLI to aggregate and present parallel test output coherently as tests complete.
_workspace/src/github.com/onsi/ginkgo/reporters
Ginkgo's Default Reporter A number of command line flags are available to tweak Ginkgo's default output.
Ginkgo's Default Reporter A number of command line flags are available to tweak Ginkgo's default output.
_workspace/src/github.com/onsi/gomega
Gomega is the Ginkgo BDD-style testing framework's preferred matcher library.
Gomega is the Ginkgo BDD-style testing framework's preferred matcher library.
_workspace/src/github.com/onsi/gomega/format
Gomega's format package pretty-prints objects.
Gomega's format package pretty-prints objects.
_workspace/src/github.com/onsi/gomega/gbytes
Package gbytes provides a buffer that supports incrementally detecting input.
Package gbytes provides a buffer that supports incrementally detecting input.
_workspace/src/github.com/onsi/gomega/gexec
Package gexec provides support for testing external processes.
Package gexec provides support for testing external processes.
_workspace/src/github.com/onsi/gomega/ghttp
Package ghttp supports testing HTTP clients by providing a test server (simply a thin wrapper around httptest's server) that supports registering multiple handlers.
Package ghttp supports testing HTTP clients by providing a test server (simply a thin wrapper around httptest's server) that supports registering multiple handlers.
_workspace/src/github.com/onsi/gomega/ghttp/protobuf
Package protobuf is a generated protocol buffer package.
Package protobuf is a generated protocol buffer package.
_workspace/src/github.com/onsi/gomega/matchers
Gomega matchers This package implements the Gomega matchers and does not typically need to be imported.
Gomega matchers This package implements the Gomega matchers and does not typically need to be imported.
_workspace/src/golang.org/x/net/context
Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.
Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.
_workspace/src/golang.org/x/net/context/ctxhttp
Package ctxhttp provides helper functions for performing context-aware HTTP requests.
Package ctxhttp provides helper functions for performing context-aware HTTP requests.
_workspace/src/golang.org/x/oauth2
Package oauth2 provides support for making OAuth2 authorized and authenticated HTTP requests.
Package oauth2 provides support for making OAuth2 authorized and authenticated HTTP requests.
_workspace/src/golang.org/x/oauth2/bitbucket
Package bitbucket provides constants for using OAuth2 to access Bitbucket.
Package bitbucket provides constants for using OAuth2 to access Bitbucket.
_workspace/src/golang.org/x/oauth2/clientcredentials
Package clientcredentials implements the OAuth2.0 "client credentials" token flow, also known as the "two-legged OAuth 2.0".
Package clientcredentials implements the OAuth2.0 "client credentials" token flow, also known as the "two-legged OAuth 2.0".
_workspace/src/golang.org/x/oauth2/facebook
Package facebook provides constants for using OAuth2 to access Facebook.
Package facebook provides constants for using OAuth2 to access Facebook.
_workspace/src/golang.org/x/oauth2/github
Package github provides constants for using OAuth2 to access Github.
Package github provides constants for using OAuth2 to access Github.
_workspace/src/golang.org/x/oauth2/google
Package google provides support for making OAuth2 authorized and authenticated HTTP requests to Google APIs.
Package google provides support for making OAuth2 authorized and authenticated HTTP requests to Google APIs.
_workspace/src/golang.org/x/oauth2/internal
Package internal contains support packages for oauth2 package.
Package internal contains support packages for oauth2 package.
_workspace/src/golang.org/x/oauth2/jws
Package jws provides encoding and decoding utilities for signed JWS messages.
Package jws provides encoding and decoding utilities for signed JWS messages.
_workspace/src/golang.org/x/oauth2/jwt
Package jwt implements the OAuth 2.0 JSON Web Token flow, commonly known as "two-legged OAuth 2.0".
Package jwt implements the OAuth 2.0 JSON Web Token flow, commonly known as "two-legged OAuth 2.0".
_workspace/src/golang.org/x/oauth2/linkedin
Package linkedin provides constants for using OAuth2 to access LinkedIn.
Package linkedin provides constants for using OAuth2 to access LinkedIn.
_workspace/src/golang.org/x/oauth2/odnoklassniki
Package odnoklassniki provides constants for using OAuth2 to access Odnoklassniki.
Package odnoklassniki provides constants for using OAuth2 to access Odnoklassniki.
_workspace/src/golang.org/x/oauth2/paypal
Package paypal provides constants for using OAuth2 to access PayPal.
Package paypal provides constants for using OAuth2 to access PayPal.
_workspace/src/golang.org/x/oauth2/vk
Package vk provides constants for using OAuth2 to access VK.com.
Package vk provides constants for using OAuth2 to access VK.com.
_workspace/src/gopkg.in/yaml.v2
Package yaml implements YAML support for the Go language.
Package yaml implements YAML support for the Go language.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL