Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the bluemixcloudfoundry deployment type #475

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ Helps you configure Travis addons.
-R, --store-repo SLUG like --repo, but remembers value for current directory
-f, --force override config section if it already exists

Available services: `anynines`, `appfog`, `artifacts`, `biicode`, `cloudcontrol`, `cloudfiles`, `cloudfoundry`, `cloud66`, `codedeploy`, `deis`, `divshot`, `elasticbeanstalk`, `engineyard`, `gcs`, `hackage`, `heroku`, `modulus`, `npm`, `ninefold`, `nodejitsu`, `openshift`, `opsworks`, `pypi`, `releases`, `rubygems`, `s3` and `sauce_connect`.
Available services: `anynines`, `appfog`, `artifacts`, `biicode`, `bluemixcloudfoundry`, `cloudcontrol`, `cloudfiles`, `cloudfoundry`, `cloud66`, `codedeploy`, `deis`, `divshot`, `elasticbeanstalk`, `engineyard`, `gcs`, `hackage`, `heroku`, `modulus`, `npm`, `ninefold`, `nodejitsu`, `openshift`, `opsworks`, `pypi`, `releases`, `rubygems`, `s3` and `sauce_connect`.

Example:

Expand Down
6 changes: 3 additions & 3 deletions assets/travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if type compdef 1>/dev/null 2>/dev/null; then
compdef _travis travis
_travis() { _travis_complete $((${#words} - 1)) "${words[2]}"; }
_travis_commands() { list=(accounts:"displays accounts and their subscription status" branches:"displays the most recent build for each branch" cache:"lists or deletes repository caches" cancel:"cancels a job or build" console:"interactive shell" disable:"disables a project" enable:"enables a project" encrypt:"encrypts values for the .travis.yml" encrypt-file:"encrypts a file and adds decryption steps to .travis.yml" endpoint:"displays or changes the API endpoint" env:"show or modify build environment variables" help:"helps you out when in dire need of information" history:"displays a projects build history" init:"generates a .travis.yml and enables the project" lint:"display warnings for a .travis.yml" login:"authenticates against the API and stores the token" logout:"deletes the stored API token" logs:"streams test logs" monitor:"live monitor for what's going on" open:"opens a build or job in the browser" pubkey:"prints out a repository's public key" raw:"makes an (authenticated) API call and prints out the result" report:"generates a report useful for filing issues" repos:"lists repositories the user has certain permissions on" requests:"lists recent requests" restart:"restarts a build or job" settings:"access repository settings" setup:"sets up an addon or deploy target" show:"displays a build or job" sshkey:"checks, updates or deletes an SSH key" status:"checks status of the latest build" sync:"triggers a new sync with GitHub" token:"outputs the secret API token" version:"outputs the client version" whatsup:"lists most recent builds" whoami:"outputs the current user") _describe -t common-commands 'common commands' list; }
_travis_setup() { list=(anynines:"automatic deployment to anynines" appfog:"automatic deployment to Appfog" artifacts:"automatic artifact shipping to S3" biicode:"automatic publish to biicode" cloudcontrol:"automatic deployment to cloudControl" cloudfiles:"automatic pushing to Rackspace Cloud Files" cloudfoundry:"automatic deployment to Cloud Foundry" cloud66:"Automatic deployment to Cloud 66" codedeploy:"triggering a new deployment on Amazon CodeDeploy" deis:"automatic deployment to a deis app" divshot:"deployment to Divshot.io" elasticbeanstalk:"deployment to AWS Elastic Beanstalk" engineyard:"automatic deployment to Engine Yard" gcs:"automatic pushing to Google Cloud Storage" hackage:"automatic deployment of hackage packages" heroku:"automatic deployment to Heroku" modulus:"deployment to Modulus" npm:"automatic release to NPM" ninefold:"Automatic deployment to Ninefold" nodejitsu:"automatic deployment to Nodejitsu" openshift:"automatic deployment to OpenShfit" opsworks:"deployment to OpsWorks" pypi:"automatic deployment to PyPI" releases:"Upload Assets to GitHub Releases" rubygems:"automatic release to RubyGems" s3:"automatic pushing to S3" sauce_connect:"Sauce Connet addon for Sauce Labs integration") _describe -t common-commands 'common commands' list; }
_travis_setup() { list=(anynines:"automatic deployment to anynines" appfog:"automatic deployment to Appfog" artifacts:"automatic artifact shipping to S3" biicode:"automatic publish to biicode" bluemixcloudfoundry:"automatic deployment to Bluemix" cloudcontrol:"automatic deployment to cloudControl" cloudfiles:"automatic pushing to Rackspace Cloud Files" cloudfoundry:"automatic deployment to Cloud Foundry" cloud66:"Automatic deployment to Cloud 66" codedeploy:"triggering a new deployment on Amazon CodeDeploy" deis:"automatic deployment to a deis app" divshot:"deployment to Divshot.io" elasticbeanstalk:"deployment to AWS Elastic Beanstalk" engineyard:"automatic deployment to Engine Yard" gcs:"automatic pushing to Google Cloud Storage" hackage:"automatic deployment of hackage packages" heroku:"automatic deployment to Heroku" modulus:"deployment to Modulus" npm:"automatic release to NPM" ninefold:"Automatic deployment to Ninefold" nodejitsu:"automatic deployment to Nodejitsu" openshift:"automatic deployment to OpenShfit" opsworks:"deployment to OpsWorks" pypi:"automatic deployment to PyPI" releases:"Upload Assets to GitHub Releases" rubygems:"automatic release to RubyGems" s3:"automatic pushing to S3" sauce_connect:"Sauce Connet addon for Sauce Labs integration") _describe -t common-commands 'common commands' list; }
_travis_settings() { list=(builds_only_with_travis_yml:"Only run builds with a .travis.yml" build_pushes:"Build pushes" build_pull_requests:"Build pull requests" maximum_number_of_builds:"Maximum number of concurrent builds") _describe -t common-commands 'common commands' list; }
_travis_init() { list=(c:'initialize c project' clojure:'initialize clojure project' cpp:'initialize cpp project' erlang:'initialize erlang project' go:'initialize go project' groovy:'initialize groovy project' haskell:'initialize haskell project' java:'initialize java project' node_js:'initialize node_js project' objective-c:'initialize objective-c project' perl:'initialize perl project' php:'initialize php project' python:'initialize python project' ruby:'initialize ruby project' scala:'initialize scala project') _describe -t common-commands 'common commands' list; }
_travis_option() {
Expand Down Expand Up @@ -68,7 +68,7 @@ elif type compctl 1>/dev/null 2>/dev/null; then
compctl -K _travis travis
_travis() { read -cA words && _travis_complete $((${#words} - 1)) "${words[2]}"; }
_travis_commands() { reply=("accounts" "branches" "cache" "cancel" "console" "disable" "enable" "encrypt" "encrypt-file" "endpoint" "env" "help" "history" "init" "lint" "login" "logout" "logs" "monitor" "open" "pubkey" "raw" "report" "repos" "requests" "restart" "settings" "setup" "show" "sshkey" "status" "sync" "token" "version" "whatsup" "whoami"); }
_travis_setup() { reply=("anynines" "appfog" "artifacts" "biicode" "cloudcontrol" "cloudfiles" "cloudfoundry" "cloud66" "codedeploy" "deis" "divshot" "elasticbeanstalk" "engineyard" "gcs" "hackage" "heroku" "modulus" "npm" "ninefold" "nodejitsu" "openshift" "opsworks" "pypi" "releases" "rubygems" "s3" "sauce_connect"); }
_travis_setup() { reply=("anynines" "appfog" "artifacts" "biicode" "bluemixcloudfoundry" "cloudcontrol" "cloudfiles" "cloudfoundry" "cloud66" "codedeploy" "deis" "divshot" "elasticbeanstalk" "engineyard" "gcs" "hackage" "heroku" "modulus" "npm" "ninefold" "nodejitsu" "openshift" "opsworks" "pypi" "releases" "rubygems" "s3" "sauce_connect"); }
_travis_settings() { reply=(builds_only_with_travis_yml build_pushes build_pull_requests maximum_number_of_builds); }
_travis_init() { reply=("c" "clojure" "cpp" "erlang" "go" "groovy" "haskell" "java" "node_js" "objective-c" "perl" "php" "python" "ruby" "scala"); }
_travis_option() {
Expand Down Expand Up @@ -115,7 +115,7 @@ elif type complete 1>/dev/null 2>/dev/null; then
complete -F _travis travis
_travis() { _travis_complete "$COMP_CWORD" "${COMP_WORDS[1]}"; }
_travis_commands() { COMPREPLY=( $(compgen -W "accounts branches cache cancel console disable enable encrypt encrypt-file endpoint env help history init lint login logout logs monitor open pubkey raw report repos requests restart settings setup show sshkey status sync token version whatsup whoami" -- "${COMP_WORDS[COMP_CWORD]}") ); }
_travis_setup() { COMPREPLY=( $(compgen -W "anynines appfog artifacts biicode cloudcontrol cloudfiles cloudfoundry cloud66 codedeploy deis divshot elasticbeanstalk engineyard gcs hackage heroku modulus npm ninefold nodejitsu openshift opsworks pypi releases rubygems s3 sauce_connect" -- "${COMP_WORDS[COMP_CWORD]}") ); }
_travis_setup() { COMPREPLY=( $(compgen -W "anynines appfog artifacts biicode bluemixcloudfoundry cloudcontrol cloudfiles cloudfoundry cloud66 codedeploy deis divshot elasticbeanstalk engineyard gcs hackage heroku modulus npm ninefold nodejitsu openshift opsworks pypi releases rubygems s3 sauce_connect" -- "${COMP_WORDS[COMP_CWORD]}") ); }
_travis_settings() { COMPREPLY=( $(compgen -W "builds_only_with_travis_yml build_pushes build_pull_requests maximum_number_of_builds" -- "${COMP_WORDS[COMP_CWORD]}") ); }
_travis_init() { COMPREPLY=( $(compgen -W ""c" "clojure" "cpp" "erlang" "go" "groovy" "haskell" "java" "node_js" "objective-c" "perl" "php" "python" "ruby" "scala"" -- "${COMP_WORDS[COMP_CWORD]}") ); }
_travis_option() {
Expand Down
57 changes: 29 additions & 28 deletions lib/travis/cli/setup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,35 @@
module Travis
module CLI
class Setup < RepoCommand
autoload :Anynines, 'travis/cli/setup/anynines'
autoload :Appfog, 'travis/cli/setup/appfog'
autoload :Artifacts, 'travis/cli/setup/artifacts'
autoload :Biicode, 'travis/cli/setup/biicode'
autoload :CloudControl, 'travis/cli/setup/cloud_control'
autoload :CloudFoundry, 'travis/cli/setup/cloud_foundry'
autoload :CodeDeploy, 'travis/cli/setup/code_deploy'
autoload :EngineYard, 'travis/cli/setup/engine_yard'
autoload :Heroku, 'travis/cli/setup/heroku'
autoload :Nodejitsu, 'travis/cli/setup/nodejitsu'
autoload :NPM, 'travis/cli/setup/npm'
autoload :OpenShift, 'travis/cli/setup/open_shift'
autoload :PyPI, 'travis/cli/setup/pypi'
autoload :RubyGems, 'travis/cli/setup/ruby_gems'
autoload :Ninefold, 'travis/cli/setup/ninefold'
autoload :S3, 'travis/cli/setup/s3'
autoload :CloudFiles, 'travis/cli/setup/cloud_files'
autoload :Divshot, 'travis/cli/setup/divshot'
autoload :Hackage, 'travis/cli/setup/hackage'
autoload :OpsWorks, 'travis/cli/setup/opsworks'
autoload :SauceConnect, 'travis/cli/setup/sauce_connect'
autoload :Modulus, 'travis/cli/setup/modulus'
autoload :Releases, 'travis/cli/setup/releases'
autoload :GCS, 'travis/cli/setup/gcs'
autoload :Cloud_66, 'travis/cli/setup/cloud_66'
autoload :ElasticBeanstalk, 'travis/cli/setup/elastic_beanstalk'
autoload :Deis, 'travis/cli/setup/deis'
autoload :Service, 'travis/cli/setup/service'
autoload :Anynines, 'travis/cli/setup/anynines'
autoload :Appfog, 'travis/cli/setup/appfog'
autoload :Artifacts, 'travis/cli/setup/artifacts'
autoload :Biicode, 'travis/cli/setup/biicode'
autoload :BluemixCloudFoundry, 'travis/cli/setup/bluemix_cloud_foundry'
autoload :CloudControl, 'travis/cli/setup/cloud_control'
autoload :CloudFoundry, 'travis/cli/setup/cloud_foundry'
autoload :CodeDeploy, 'travis/cli/setup/code_deploy'
autoload :EngineYard, 'travis/cli/setup/engine_yard'
autoload :Heroku, 'travis/cli/setup/heroku'
autoload :Nodejitsu, 'travis/cli/setup/nodejitsu'
autoload :NPM, 'travis/cli/setup/npm'
autoload :OpenShift, 'travis/cli/setup/open_shift'
autoload :PyPI, 'travis/cli/setup/pypi'
autoload :RubyGems, 'travis/cli/setup/ruby_gems'
autoload :Ninefold, 'travis/cli/setup/ninefold'
autoload :S3, 'travis/cli/setup/s3'
autoload :CloudFiles, 'travis/cli/setup/cloud_files'
autoload :Divshot, 'travis/cli/setup/divshot'
autoload :Hackage, 'travis/cli/setup/hackage'
autoload :OpsWorks, 'travis/cli/setup/opsworks'
autoload :SauceConnect, 'travis/cli/setup/sauce_connect'
autoload :Modulus, 'travis/cli/setup/modulus'
autoload :Releases, 'travis/cli/setup/releases'
autoload :GCS, 'travis/cli/setup/gcs'
autoload :Cloud_66, 'travis/cli/setup/cloud_66'
autoload :ElasticBeanstalk, 'travis/cli/setup/elastic_beanstalk'
autoload :Deis, 'travis/cli/setup/deis'
autoload :Service, 'travis/cli/setup/service'

description "sets up an addon or deploy target"
on('-f', '--force', 'override config section if it already exists')
Expand Down
21 changes: 21 additions & 0 deletions lib/travis/cli/setup/bluemix_cloud_foundry.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
require 'travis/cli/setup'

module Travis
module CLI
class Setup
class BluemixCloudFoundry < Service
description "automatic deployment to Bluemix Cloud Foundry"

def run
deploy 'bluemixcloudfoundry' do |config|
config['username'] ||= ask("Bluemix username: ").to_s
config['password'] ||= ask("Bluemix password: ") { |q| q.echo = "*" }.to_s
config['organization'] ||= ask("Bluemix organization: ").to_s
config['space'] ||= ask("Bluemix space: ").to_s
config['region'] ||= ask("Bluemix region [ng, eu-gb, au-syd]: ") { |q| q.default = "ng" }
end
end
end
end
end
end
1 change: 1 addition & 0 deletions travis.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ Gem::Specification.new do |s|
"lib/travis/cli/setup/appfog.rb",
"lib/travis/cli/setup/artifacts.rb",
"lib/travis/cli/setup/biicode.rb",
"lib/travis/cli/setup/bluemix_cloud_foundry.rb",
"lib/travis/cli/setup/cloud_66.rb",
"lib/travis/cli/setup/cloud_control.rb",
"lib/travis/cli/setup/cloud_files.rb",
Expand Down