Files
mgmt/.travis.yml
Jonathan Gold 5e5bbf4b39 travis: Allow travis builds to access target branches
Because travis builds only fetch a single branch (master) by default,
test-commit-message.sh only had access to commits in the master branch.
In order to fetch the correct branch for our build, we need to run
'git config remote.origin.fetch..' with the target branch's information
before executing git fetch on the repo in before_install.

Now git will always fetch the appropriate branch.
2017-11-18 21:04:12 -05:00

36 lines
762 B
YAML

language: go
go:
- 1.8.x
- 1.9.x
- tip
go_import_path: github.com/purpleidea/mgmt
sudo: true
dist: trusty
before_install:
- sudo apt update
- git config remote.origin.fetch +refs/heads/${TRAVIS_BRANCH}:refs/remotes/origin/${TRAVIS_BRANCH}
- git fetch --unshallow
install: 'make deps'
script: 'make test'
matrix:
fast_finish: true
allow_failures:
- go: tip
- go: 1.9.x
notifications:
irc:
channels:
- "irc.freenode.net#mgmtconfig"
template:
- "%{repository} (%{commit}: %{author}): %{message}"
- "More info : %{build_url}"
on_success: always
on_failure: always
use_notice: false
skip_join: false
email:
recipients:
- travis-ci@shubin.ca
on_failure: change
on_success: change