Giter Club home page Giter Club logo

travis-deploy's Introduction

Travis Deploy Tool

Deployment tool for Travis CI

Currently supports the following commands:

$ travis deploy [remote] # deploy to remote
$ travis config [remote] # sync the local config file from travis-keychain and push the config to remote

The tool relies on git remotes being defined in .git/config. So, in order to deploy to production there needs to be a production remote repository defined in the git config.

Deployment

Deploying to staging will just push to staging and run the migrations if -m was given. One can also pass -c in order to configure the app.

Deploying to production.
$ git push staging HEAD:master
Running migrations.
$ heroku run rake db:migrate -r staging

Deploying to production will also update the production branch and tag the current commit.

Updating production branch.
$ git checkout production
$ git reset --hard master
$ git push origin production -f
Tagging deploy 2011-12-11 16:04.
$ git tag -a 'deploy.2011-12-11.16-04' -m 'deploy 2011-12-11 16:04'
$ git push --tags
$ git checkout master
Deploying to production.
$ git push production HEAD:master -f
Running migrations.
$ heroku run rake db:migrate -r production

WARNING:

The production branch is updated using git reset --hard [branch] and pushed using git push origin production -f.

That means that all commits in the production branch that are not present in the target branch (e.g. master) will be removed from the history of production.

So never commit to the production branch directly!

travis-deploy's People

Contributors

drogus avatar laserlemon avatar rkh avatar svenfuchs avatar dhiemstra avatar sarahhodne avatar joshk avatar tax avatar

Stargazers

Angus H. avatar Yuuki TSUBOUCHI avatar Saul Shanabrook avatar Bernardo avatar j-j.eth avatar Voltron avatar Artem Vovsia avatar Eduardo avatar Sven Lito avatar Nick Gauthier avatar

Watchers

 avatar Jeroen van Dijk avatar Jeff Kreeftmeijer avatar Eric M avatar Eduardo avatar Franck Verrot avatar  avatar Nathan Broadbent avatar Lucas Krebs-Pinto avatar Josef Šimánek avatar Jan Schulte avatar Lukas Kahwe Smith avatar Gilles Cornu avatar Grant MacGillivray avatar Suzan Bond avatar James Cloos avatar Sergiy Golub avatar Randy Morgan avatar Roman Lishtaba avatar Aakriti Gupta avatar Laura avatar weban.pl avatar Joshua Anderson avatar Alexander Toshio Davila Chinen avatar Damian Szymański avatar Berrak Nil avatar  avatar Renée Hendricksen avatar Maria Jose Balbontin avatar  avatar  avatar Murtaza Khan avatar

travis-deploy's Issues

Error fetching public key while encrypting environment variable

I'm using travis (0.0.6) and I get the same error as described in Use https url to retrieve public key:

[bdu-padrino (master)]$ travis encrypt mariusbutuc/bdu-padrino MY_SECRET_ENV=super_secret

About to encrypt 'MY_SECRET_ENV=super_secret' for 'mariusbutuc/bdu-padrino'

There was an error while fetching public key, please check if you entered correct slug

even if I'm editing lib/travis/cli/secure_key.rb to

  • use either https or http URL to retrieve the public key,
  • either skip the SSL certificate verification or not.

What else can I check to ensure encrypting works?


Also in the browser, travis-ci.org/mariusbutuc/bdu-padrino.json shows Loading forever...

What's expected to be rendered here?

travis encrypt not working

Could be user error:

~  ruby --version
ruby 1.9.3p286 (2012-10-12 revision 37165) [x86_64-darwin11.4.2]
➜  ~  gem install travis
Fetching: travis-0.0.8.gem (100%)
Successfully installed travis-0.0.8
1 gem installed
Installing ri documentation for travis-0.0.8...
Installing RDoc documentation for travis-0.0.8...
➜  ~  travis encrypt gengo/gengo-python FOO=bar 

About to encrypt 'FOO=bar' for 'gengo/gengo-python'

dyld: lazy symbol binding failed: Symbol not found: _yajl_set_static_value
  Referenced from: /Users/shawn/.rvm/gems/ruby-1.9.3-p286/gems/yajl-ruby-0.8.3/ext/yajl/yajl.bundle
  Expected in: flat namespace

dyld: Symbol not found: _yajl_set_static_value
  Referenced from: /Users/shawn/.rvm/gems/ruby-1.9.3-p286/gems/yajl-ruby-0.8.3/ext/yajl/yajl.bundle
  Expected in: flat namespace

[1]    5790 trace trap  travis encrypt gengo/gengo-python 

Stack trace in Travis when the file for deployment is not found

Hello,

when the file for deployment is not found, Travis-deploy crashes with a stack trace.

/usr/local/rvm/gems/ruby-1.9.3-p551/gems/octokit-4.3.0/lib/octokit/client/releases.rb:86:in `initialize': No such file or directory - ./install-llvm/ghdl-llvm-0.34dev.tar.gz (Errno::ENOENT)
    from /usr/local/rvm/gems/ruby-1.9.3-p551/gems/octokit-4.3.0/lib/octokit/client/releases.rb:86:in `new'
    from /usr/local/rvm/gems/ruby-1.9.3-p551/gems/octokit-4.3.0/lib/octokit/client/releases.rb:86:in `upload_asset'
    from /usr/local/rvm/gems/ruby-1.9.3-p551/gems/dpl-1.8.14/lib/dpl/provider/releases.rb:130:in `upload_file'
    from /usr/local/rvm/gems/ruby-1.9.3-p551/gems/dpl-1.8.14/lib/dpl/provider/releases.rb:111:in `block in push_app'
    from /usr/local/rvm/gems/ruby-1.9.3-p551/gems/dpl-1.8.14/lib/dpl/provider/releases.rb:102:in `each'
    from /usr/local/rvm/gems/ruby-1.9.3-p551/gems/dpl-1.8.14/lib/dpl/provider/releases.rb:102:in `push_app'
    from /usr/local/rvm/gems/ruby-1.9.3-p551/gems/dpl-1.8.14/lib/dpl/provider.rb:145:in `block in deploy'
    from /usr/local/rvm/gems/ruby-1.9.3-p551/gems/dpl-1.8.14/lib/dpl/cli.rb:41:in `fold'
    from /usr/local/rvm/gems/ruby-1.9.3-p551/gems/dpl-1.8.14/lib/dpl/provider.rb:145:in `deploy'
    from /usr/local/rvm/gems/ruby-1.9.3-p551/gems/dpl-1.8.14/lib/dpl/cli.rb:32:in `run'
    from /usr/local/rvm/gems/ruby-1.9.3-p551/gems/dpl-1.8.14/lib/dpl/cli.rb:7:in `run'
    from /usr/local/rvm/gems/ruby-1.9.3-p551/gems/dpl-1.8.14/bin/dpl:5:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-1.9.3-p551/bin/dpl:23:in `load'
    from /usr/local/rvm/gems/ruby-1.9.3-p551/bin/dpl:23:in `<main>'
failed to deploy

Such an error should be caught and printed as an message instead of a stack trace.

Not working on windows

I get the following when running travis encrypt ForbesLindesay/component-website MY_SECRET_ENV=super_secret

About to encrypt 'MY_SECRET_ENV=super_secret' for 'ForbesLindesay/component-website'

C:/Program Files (x86)/ruby-1.9.3/lib/ruby/1.9.1/net/http.rb:678:in `connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError)
   from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/1.9.1/net/http.rb:678:in `block in connect'
   from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/1.9.1/timeout.rb:44:in `timeout'
   from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/1.9.1/timeout.rb:89:in `timeout'
   from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/1.9.1/net/http.rb:678:in `connect'
   from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/1.9.1/net/http.rb:637:in `do_start'
   from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/1.9.1/net/http.rb:626:in `start'
   from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/1.9.1/net/http.rb:1168:in `request'
   from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/travis-0.0.10/lib/travis/cli/secure_key.rb:35:in `fetch_key'
   from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/travis-0.0.10/lib/travis/cli/secure_key.rb:24:in `key'
   from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/travis-0.0.10/lib/travis/cli/secure_key.rb:20:in `encrypt'
   from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/travis-0.0.10/lib/travis/cli.rb:41:in `encrypt'
   from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/task.rb:27:in `run'
   from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/invocation.rb:120:in `invoke_task'
   from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor.rb:275:in `dispatch'
   from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/base.rb:425:in `start'
   from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/travis-0.0.10/bin/travis:11:in `<top (required)>'
   from C:/Program Files (x86)/ruby-1.9.3/bin/travis:19:in `load'
   from C:/Program Files (x86)/ruby-1.9.3/bin/travis:19:in `<main>'

Rename travis-deploy to travis-ops

travis-deploy deploy <foo> seems a bit redundant, and the travis name is taken, so I was thinking maybe travis-ops? The repo itself could be named something else, maybe travis-ops-tool if we want to reserve the travis-ops name for something else.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.