-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
52 lines (46 loc) · 1.86 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
sudo: required
branches:
only:
- master
services:
- docker
env:
- CHANGE_MINIKUBE_NONE_USER=true
before_script:
# install Go
- (sudo add-apt-repository -y ppa:gophers/archive; sudo apt-get -y update; sudo apt-get -y install golang-1.9-go) > /dev/null 2>&1
- export PATH=/usr/lib/go-1.9/bin:$PATH; export GOROOT=/usr/lib/go-1.9/
# place repository in GOPATH (a.k.a. do the GOPATH dance)
- echo "GOPATH is $GOPATH"; mkdir -p $GOPATH/src/github.com/IBM/; mv `pwd` $GOPATH/src/github.com/IBM/; cd $GOPATH/src/github.com/IBM/*
# install Glide
- curl https://glide.sh/get | bash > /dev/null
# install "nsenter" (needed for k8s container port forwarding)
- docker run --rm jpetazzo/nsenter cat /nsenter > /tmp/nsenter 2> /dev/null; sudo cp /tmp/nsenter /usr/local/bin/; sudo chmod +x /usr/local/bin/nsenter; which nsenter
# install Minikube (in the background, to speed up the build)
- make install-minikube-in-ci > /dev/null &
# install Helm
- curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash > /dev/null &
# install aws CLI
- (sudo pip install -q awscli; which aws > /dev/null) &
script:
# fail fast
- set -e
- export MAKE_ARGS=--no-print-directory
# Open SSH
# - echo travis:$sshpassword | sudo chpasswd
# - sudo sed -i 's/ChallengeResponseAuthentication no/ChallengeResponseAuthentication yes/' /etc/ssh/sshd_config
# - sudo service ssh restart
# - sudo apt-get install sshpass
# - sshpass -p $sshpassword ssh -R 9999:localhost:22 -o StrictHostKeyChecking=no travis@$bouncehostip
# compile and build Docker images
- glide -q install
- make $MAKE_ARGS docker-build-base
- make $MAKE_ARGS gen-certs
- make $MAKE_ARGS build
- make $MAKE_ARGS docker-build
# deploy services
- make $MAKE_ARGS deploy
# submit a test job
- make $MAKE_ARGS test-submit-minikube-ci
notifications:
email: false