Travis automerge / deploy

时间:2017-12-22 21:22:27

标签: continuous-integration travis-ci travis-ci-cli

我正在尝试让Travis CI自动部署并将分支合并到master。这是我正在使用的脚本。在构建成功时,它表示它正在跳过部署,因为它不在正确的分支上,这就是我希望它合并分支的原因是构建成功。有什么提示吗?

script:
  - export RAILS_ENV=test
  - bundle exec rake db:create db:schema:load db:test:prepare
  - bundle exec rspec --color --format documentation --require spec_helper --require rails_helper
  - bundle exec brakeman --exit-on-warn --quiet -f plain
before_script:
  - bundle exec rake db:create
  - RAILS_ENV=test bundle exec rake db:migrate --trace
  - bundle exec rake db:test:prepare
deploy: &heroku
  provider: heroku
  api_key:
    secure: encrypted travis key
    app: herokuapp.com
    run: rake db:migrate
    strategy: git
    env:
      global:
        secure: encrytped github key
after_success:
  - "curl -o /tmp/travis-automerge https://raw.githubusercontent.com/mikeyduece/travis-automerge/master/travis-automerge"
  - "chmod a+x /tmp/travis-automerge/merge.sh"
  - "BRANCH_TO_MERGE_INTO=* GITHUB_REPO=user/repo /tmp/travis-automerge"
notifications:
  email: false

0 个答案:

没有答案