Last active
December 31, 2015 09:59
-
-
Save sawanoboly/7970363 to your computer and use it in GitHub Desktop.
Travis-CIのビルドをherokuから繰り返し実行する ref: http://qiita.com/sawanoboly/items/7f275e20fb6a643a3553
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
script: "./test.sh" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ heroku apps:create travis-bash-sample | |
Creating travis-bash-sample... done, stack is cedar | |
http://travis-bash-sample.herokuapp.com/ | [email protected]:travis-bash-sample.git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git remote add heroku [email protected]:travis-bash-sample.git | |
$ git push heroku | |
Initializing repository, done. | |
Counting objects: 6, done. | |
Delta compression using up to 4 threads. | |
Compressing objects: 100% (5/5), done. | |
Writing objects: 100% (6/6), 1.12 KiB | 0 bytes/s, done. | |
Total 6 (delta 0), reused 0 (delta 0) | |
-----> Ruby app detected | |
-----> Compiling Ruby | |
# -- 以下略 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ heroku config:add TRAVIS_TOKEN="YOUR_TOKEN" | |
$ heroku config:add TRAVIS_BUILD="OpsRockin/travis_bash_sample" | |
$ heroku run rake | |
Running `rake` attached to terminal... up, run.7639 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ heroku addons:add scheduler:standard | |
Adding scheduler:standard on travis-bash-sample... done, v5 (free) | |
This add-on consumes dyno hours, which could impact your monthly bill. To learn more: | |
http://devcenter.heroku.com/addons_with_dyno_hour_usage | |
To manage scheduled jobs run: | |
heroku addons:open scheduler | |
Use `heroku addons:docs scheduler` to view documentation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ heroku addons:open scheduler | |
Opening scheduler:standard for travis-bash-sample... done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ heroku logs --ps scheduler | |
2013-12-15T07:27:38.479645+00:00 heroku[scheduler.1943]: Starting process with command `bundle exec rake` | |
2013-12-15T07:27:44.896760+00:00 heroku[scheduler.1943]: Process exited with status 0 | |
2013-12-15T07:27:44.916523+00:00 heroku[scheduler.1943]: State changed from up to complete | |
2013-12-15T07:27:39.142666+00:00 heroku[scheduler.1943]: State changed from starting to up | |
2013-12-15T07:36:32.726247+00:00 heroku[scheduler.8651]: Starting process with command `bundle exec rake` | |
2013-12-15T07:36:33.395186+00:00 heroku[scheduler.8651]: State changed from starting to up | |
2013-12-15T07:36:40.094286+00:00 heroku[scheduler.8651]: Process exited with status 0 | |
2013-12-15T07:36:40.100911+00:00 heroku[scheduler.8651]: State changed from up to complete |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bundler/setup' | |
require 'travis' | |
desc 'call travis to build restart' | |
task :default do | |
Travis.access_token = ENV['TRAVIS_TOKEN'] | |
build = Travis::Repository.find(ENV['TRAVIS_BUILD']) | |
build.last_build.restart | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
curl -s -L https://www.getchef.com/chef/install.sh | bash -n && echo 'syntax OK' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment