-
Notifications
You must be signed in to change notification settings - Fork 187
/
.travis.yml
64 lines (58 loc) · 2.72 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
53
54
55
56
57
58
59
60
61
62
63
64
language: python
python: 3.6
sudo: required
branches:
only:
- master
services:
- docker
env:
- CHANGE_MINIKUBE_NONE_USER=true
before_script:
# lint Python for syntax errors and undefined names
- pip install flake8
- flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
# 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
- export VM_TYPE=minikube
# 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
# initialize helm tiller
- helm init
- while ! (kubectl get pods --all-namespaces | grep tiller-deploy | grep '1/1'); do sleep 5; done
# Prepare any local/static volume as the shared file system and deploy all the helper micro-services for ffdl
- helm install docs/helm-charts/ffdl-helper-0.1.1.tgz --set prometheus.deploy=false,localstorage=true --wait
# Deploy all the core ffdl services.
- export IMAGE_TAG=user-$(whoami)
- helm install docs/helm-charts/ffdl-core-0.1.1.tgz --set trainer.version=${IMAGE_TAG},restapi.version=${IMAGE_TAG},lcm.version=${IMAGE_TAG},trainingdata.version=${IMAGE_TAG},databroker.tag=${IMAGE_TAG},databroker.version=${IMAGE_TAG},webui.version=${IMAGE_TAG} --wait
# submit a test job
- make $MAKE_ARGS test-submit-minikube-ci
notifications:
email: false