-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
110 lines (110 loc) · 3.02 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
notifications:
email: false
git:
quiet: true
depth: false
language: java
jdk: openjdk11
node_js: lts/*
python: 3.7
matrix:
include:
- python: 3.7
services:
- xvfb
- docker
addons:
apt:
update: false
packages:
- jq
- bash
- curl
- tree
- docker-ce
- libxml2-utils
- libappindicator1
- fonts-liberation
- google-chrome-stable
- python3-setuptools
- python3-pip
install: true
before_install:
- export CHROME_BIN=/usr/bin/google-chrome
- export DISPLAY=:99.0
#
- if [ ! -f ${HOME}/.local/daggerok/bash-functions/master/main.bash ] ; then
mkdir -p ${HOME}/.local/daggerok/bash-functions/master ;
curl -s https://raw.githubusercontent.com/daggerok/bash-functions/master/main.bash > ${HOME}/.local/daggerok/bash-functions/master/main.bash ;
fi
- source ${HOME}/.local/daggerok/bash-functions/master/main.bash
- stop_any 80 5432 8080 6551
#
- export PATH=$HOME/.local/bin:$PATH
- pip3 install --user --upgrade pip
- pip install --user --upgrade httpie docker-compose
env:
global:
- TERM=dumb
jobs:
include:
- stage: test
jdk: openjdk11
name: test
script: cd $TRAVIS_BUILD_DIR && ./mvnw
- stage: test
jdk: openjdk11
name: integration test
script:
- cd $TRAVIS_BUILD_DIR
- ./mvnw
- java -jar target/*.jar &
- wait_for 8080
- sleep 10s
- http :8080
- http :8080/world
- http :8080/max
- stop_any 8080
# - stage: test
# name: kubectl integration test on k3d k3s k8s
# jdk: openjdk11
# script:
# - cd $TRAVIS_BUILD_DIR
# #- wget -q -O - https://raw.githubusercontent.com/rancher/k3d/master/install.sh | bash
# - curl -s https://raw.githubusercontent.com/rancher/k3d/master/install.sh | bash
# - k3d create --api-port 6551 --publish 80:80
# - sleep 30s
# - export KUBECONFIG="$(k3d get-kubeconfig --name='k3s-default')"
# #
# - curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
# - chmod +x ./kubectl
# #- mkdir -p ~/.local/bin/
# - mv -f ./kubectl ~/.local/bin/
# - kubectl cluster-info
# - kubectl get pods --all-namespaces
# #
# - kubectl get pods -w &
# - kubectl apply -f k8s/
# - kubectl get all
# - sleep 30s
# - kubectl get all
# - sleep 30s
# - kubectl get all -o wide
# - kubectl logs deployment/voting-depl
# - http :/flow --stream
# - http :/ --stream
# - http :/pub-sub
# - http :/api/pub-sub --stream &
# - for i in 1 2 3 4 5 6 7 8 ; do http :/api/pub-sub body="`date`" 'accept:text/event-stream' ; done
# #
# - kubectl delete -f k8s/
# #- k3d stop
# - k3d delete
cache:
pip: true
packages: true
directories:
- ~/.local/daggerok
- ~/.config
- ~/.docker
- ~/.m2