Skip to content

Commit

Permalink
Migrate to IBM Travis (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenzhiwei authored and GitHub Enterprise committed Feb 6, 2018
1 parent 3678cd0 commit 65ad4fd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
17 changes: 7 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,24 @@ go:
- 1.8

os:
- power
- linux
- linux-ppc64le

services:
- docker

# Only build on master, stable branches and tag
# The stable branch and tag should be leading with numbers
branches:
only:
- master
- /^[0-9]+\..*$/
- /^v[0-9]+\..*$/
- /^release-[0-9]+\..*$/

before_install:
- source travis-env.sh

install:
- sudo apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
- echo "deb https://apt.dockerproject.org/repo ubuntu-precise main" | sudo tee /etc/apt/sources.list.d/docker.list
- sudo apt-get update
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
sudo apt-get install -y docker-engine;
sudo chown ${USER} /var/run/docker.sock;
fi
- docker info

before_script:
- make lint
Expand Down
4 changes: 2 additions & 2 deletions travis-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
if [ "$TRAVIS_BRANCH" = "master" ]; then
RELEASE_TAG=latest
else
RELEASE_TAG="${TRAVIS_BRANCH}-latest"
RELEASE_TAG="${TRAVIS_BRANCH#release-}-latest"
fi
if [ "$TRAVIS_TAG" != "" ]; then
RELEASE_TAG="$TRAVIS_TAG"
RELEASE_TAG="${TRAVIS_TAG#v}"
fi
export RELEASE_TAG="$RELEASE_TAG"

Expand Down

0 comments on commit 65ad4fd

Please sign in to comment.