LoginSignup
2
2

More than 5 years have passed since last update.

Travis CIでbundle updateを実行し、Pull Requestを作成するGemを作った

Posted at

travisci-bundle-update-pr

  • Travis CIでbundle updateを実行し、Pull Requestを作成する。

GitHub Personal access tokens

$ gem install travis  
$ travis encrypt GITHUB_ACCESS_TOKEN=secretvalue  
.travis.yml
env:
  global:
    - secure: ".... encrypted data ...."

使い方

.travis.yml
$ gem install travisci-bundle-update-pr
$ travisci-bundle-update-pr TravisCI travisci@example.com master target_path
  • 第1引数
    • gitユーザー名
  • 第2引数
    • gitメールアドレス
  • 第3引数
    • プルリクエスト先ブランチ
    • 省略した場合、master
  • 第4引数
    • Gemfileパス
    • 省略した場合、カレントディレクトリ

Cron Jobs

  • Travis CIのCron Jobsはデフォルトでは使えない。
  • サポートにメール問い合わせすることで使えるようになる。
  • 設定内容

    • Branch
    • Interval
      • monthly
      • weekly
      • daily
    • Options
      • Always run
      • Only run if no new commits
  • Travis CIのCron Jobsを使って、実行する場合

.travis.yml
before_script:
  - if [ "${TRAVIS_EVENT_TYPE}" = "cron" ]; then gem install travisci-bundle-update-pr; travisci-bundle-update-pr TravisCI travisci@example.com master; fi
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2