forked from redhat-developer/odo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
215 lines (203 loc) · 7.58 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
dist: xenial
sudo: required
language: go
jobs:
include:
# YAML alias, for settings shared across the tests
- &base-test
stage: test
go_import_path: github.com/openshift/odo
go: "1.13.x"
install:
- make goget-tools
script:
- lsb_release -a
- export PATH="$PATH:$GOPATH/bin"
- make bin
- make validate
- make test-coverage
after_success:
# submit coverage.txt to codecov.io
- bash <(curl -s https://codecov.io/bash)
# YAML alias, for settings shared across the tests on windows
- &windows-test
stage: Test
name: "Unit test on windows"
os:
- windows
init:
- git config --system core.longpaths true
go_import_path: github.com/openshift/odo
go: "1.13.x"
install:
- systeminfo.exe | grep '^OS'
- choco install make
- make goget-tools
script:
- export PATH="$PATH:$GOPATH/bin"
- make bin
- rm -r /tmp/*
- make test
after_success: skip
# YAML alias, for settings shared across the tests on macOS
- &osx-test
stage: Test
name: "Unit test on OSX"
os:
- osx
go_import_path: github.com/openshift/odo
go: "1.13.x"
install:
- make goget-tools
script:
- system_profiler SPSoftwareDataType
- export PATH="$PATH:$GOPATH/bin"
- make bin
- make validate
- make test
after_success: skip
- <<: *base-test
stage: test
name: "generic, login and component command integration tests"
script:
- ./scripts/oc-cluster.sh
- make configure-supported-311-is
- make bin
- sudo cp odo /usr/bin
- odo login -u developer
- travis_wait make test-generic
- travis_wait make test-cmd-login-logout
- travis_wait make test-cmd-cmp
- odo logout
- <<: *base-test
stage: test
name: "preference, config, url and debug command integration tests"
script:
- ./scripts/oc-cluster.sh
- make configure-supported-311-is
- make bin
- sudo cp odo /usr/bin
- odo login -u developer
- travis_wait make test-cmd-pref-config
- travis_wait make test-cmd-url
- travis_wait make test-cmd-devfile-url
- travis_wait make test-cmd-debug
- travis_wait make test-cmd-devfile-debug
- odo logout
# Run service-catalog e2e tests
- <<: *base-test
stage: test
name: "service, link and component sub-commands command integration tests"
script:
- ./scripts/oc-cluster.sh service-catalog
- make configure-supported-311-is
- make bin
- sudo cp odo /usr/bin
- odo login -u developer
- travis_wait make test-cmd-service
- travis_wait make test-cmd-link-unlink
- travis_wait make test-cmd-cmp-sub
- odo logout
- <<: *base-test
stage: test
name: "watch, storage, app, project and push command integration tests"
script:
- ./scripts/oc-cluster.sh
- make configure-supported-311-is
- make bin
- sudo cp odo /usr/bin
- odo login -u developer
- travis_wait make test-cmd-watch
- travis_wait make test-cmd-storage
- travis_wait make test-cmd-app
- travis_wait make test-cmd-push
- travis_wait make test-cmd-project
- odo logout
- <<: *base-test
stage: test
# Docker push target test command does not need a running cluster at all, however few test
# scenario of docker devfile url testing needs only Kube config file. So the test has been
# added here just to make sure docker devfile url command test gets a proper kube config file.
# without creating a separate OpenShift cluster.
name: "devfile catalog, create, push, delete, registry, test, log and docker devfile url command integration tests"
script:
- ./scripts/oc-cluster.sh
- make configure-supported-311-is
- make bin
- sudo cp odo /usr/bin
- travis_wait make test-cmd-docker-devfile-url-pushtarget
# These tests need cluster login as they will be interacting with a Kube environment
- odo login -u developer
- travis_wait make test-cmd-devfile-catalog
- travis_wait make test-cmd-devfile-create
- travis_wait make test-cmd-devfile-push
- travis_wait make test-cmd-devfile-watch
- travis_wait make test-cmd-devfile-delete
- travis_wait make test-cmd-devfile-registry
- travis_wait make test-cmd-devfile-test
- travis_wait make test-cmd-devfile-log
- travis_wait make test-cmd-devfile-exec
- odo logout
- <<: *base-test
stage: test
name: "core beta, java, source e2e tests"
script:
- ./scripts/oc-cluster.sh
- make configure-supported-311-is
- make bin
- sudo cp odo /usr/bin
- odo login -u developer
- travis_wait make test-e2e-beta
- travis_wait make test-e2e-java
- travis_wait make test-e2e-source
- travis_wait make test-e2e-images
- odo logout
- <<: *base-test
stage: test
name: "docker devfile push, watch, url, test, catalog, exec and delete command integration tests"
script:
- make bin
- sudo cp odo /usr/bin
- travis_wait make test-cmd-docker-devfile-push
- travis_wait make test-cmd-docker-devfile-watch
- travis_wait make test-cmd-docker-devfile-catalog
- travis_wait make test-cmd-docker-devfile-delete
- travis_wait make test-cmd-docker-devfile-url
- travis_wait make test-cmd-docker-devfile-test
- travis_wait make test-cmd-docker-devfile-exec
# Run devfile integration test on Kubernetes cluster
- <<: *base-test
stage: test
name: "devfile catalog,url, watch, push, debug, delete, exec, test, log and create command integration tests on kubernetes cluster"
env:
- MINIKUBE_WANTUPDATENOTIFICATION=false
- MINIKUBE_WANTREPORTERRORPROMPT=false
- MINIKUBE_HOME=$HOME
- CHANGE_MINIKUBE_NONE_USER=true
- KUBECONFIG=$HOME/.kube/config
before_script:
# Download kubectl, a cli tool for accessing Kubernetes cluster
- curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.16.1/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
# Download minikube and set up Kubernetes single node cluster
- curl -Lo minikube https://storage.googleapis.com/minikube/releases/v1.11.0/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
- mkdir -p $HOME/.kube $HOME/.minikube
- touch $KUBECONFIG
- sudo minikube start --vm-driver=none --kubernetes-version=v1.16.1
- "sudo chown -R travis: /home/travis/.minikube/"
- sudo apt-get -qq update
- sudo apt-get install -y socat
script:
- kubectl cluster-info
- make bin
- sudo cp odo /usr/bin
- export KUBERNETES=true
- travis_wait make test-cmd-devfile-catalog
- travis_wait make test-cmd-devfile-watch
- travis_wait make test-cmd-devfile-push
- travis_wait make test-cmd-devfile-debug
- travis_wait make test-cmd-devfile-exec
- travis_wait make test-cmd-devfile-delete
- travis_wait make test-cmd-devfile-create
- travis_wait make test-cmd-devfile-url
- travis_wait make test-cmd-devfile-test
- travis_wait make test-cmd-devfile-log