-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
54 lines (54 loc) · 1.63 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
service:
- docker
require: sudo
env:
global:
- TERM=dumb
language: java
install: true
before_script:
- sudo apt update -y >/dev/null 2>&1 || true
- sudo apt install -y --no-install-recommends curl docker-ce python-pip >/dev/null 2>&1
- sudo pip install docker-compose httpie >/dev/null 2>&1
- source <(curl -s https://raw.githubusercontent.com/daggerok/bash-functions/master/main.bash)
- stop_any 8080 80
script:
# maven
- bash ./mvnw >/dev/null 2>&1
- bash ./mvnw -pl ear com.dkanejs.maven.plugins:docker-compose-maven-plugin:1.0.1:up >/dev/null 2>&1
- wait_for 8080
- docker logs -f ear_maven-java-ee-multi-project-app_1 &
- sleep 35
- http :8080/web/
- http --form :8080/servlet/api/ name=Max
- http post :8080/rest/api/ name=Maksim
- http :8080/jsp/
- bash ./mvnw -pl ear com.dkanejs.maven.plugins:docker-compose-maven-plugin:1.0.1:down >/dev/null 2>&1
- stop_any 8080 80
# gradle
- bash ./gradlew >/dev/null 2>&1
- bash ./gradlew composeUp >/dev/null 2>&1
- sleep 3
- wait_for 8080
- docker logs -f ear_gradle-java-ee-multi-project-app_1 &
- http :8080/web/
- http --form :8080/servlet/api/ name=Maksim
- http post :8080/rest/api/ name=Maksimko
- http :8080/jsp/
- bash ./gradlew composeDown >/dev/null 2>&1
- stop_any 8080 80
# gradle (maven profile)
- bash ./gradlew -Pprofile=maven clean build composeUp >/dev/null 2>&1
- wait_for 8080
- docker logs -f ear_maven-java-ee-multi-project-app_1 &
- sleep 3
- http :8080/web/
- http --form :8080/servlet/api/ name=Maksimko
- http post :8080/rest/api/ buddy=Max
- http :8080/jsp/
- bash ./gradlew -Pprofile=maven composeDown >/dev/null 2>&1
- stop_any 8080 80
cache:
directories:
- $HOME/.m2
- $HOME/.gradle