-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
96 lines (77 loc) · 2.59 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
language: java
git:
depth: 3
services:
- docker
jdk:
- openjdk8
cache:
directories:
- '$HOME/.m2/repository'
branches:
only:
- feature-zack
- master
jobs:
include:
- stage: build-tutorial-sample
script:
- chmod +x $PWD/export.var.sh
- bash $PWD/export.var.sh
- source $PWD/export.var.sh
- echo $commit_id
- echo $image_tag
- echo "BUILD JAVA-SE"
- cd $project_home/java/javase/
- mvn clean package -DskipTests=true
- echo "BUILD-SPRING"
- cd $project_home/java/javaee/spring/spring
- mvn clean package -DskipTests=true
- echo "BUILD-SPRING-INTEGRATION"
- cd $project_home/java/javaee/spring/integration
- mvn clean package -DskipTests=true
- echo "BUILD-SPRING-MVC"
- cd $project_home/java/javaee/spring-mvc
- mvn clean package -DskipTests=true
- echo "BUILD-SPRING-BOOT"
- cd $project_home/java/javaee/spring-boot/integration
- mvn clean package -DskipTests=true
# push image to ali register center
- image_tag=tutorial-$encrypt_module_name:`date +%Y%m%d`.${TRAVIS_COMMIT:0:7}
- cd $project_home/java/javaee/spring-boot/integration/$encrypt_module_name
# - docker build -f Dockerfile -t $image_tag .
# - sudo docker login --username=$DOCKER_USERNAME --password=$DOCKER_PASSWORD $DOCKER_REPO
# - sudo docker tag $image_tag $DOCKER_REPO/alice52/$image_tag
# - travis_wait $travis_wait sudo docker push $DOCKER_REPO/alice52/$image_tag
- echo "BUILD-SPRING-CLOUD"
- cd $project_home/java/javaee/spring-cloud/springcloud
- mvn clean package -DskipTests=true
- echo "BUILD-SPRING-CLOUD-RELEVANT"
- cd $project_home/java/javaee/spring-cloud/relevant
- mvn clean package -DskipTests=true
- echo "BUILD-JOB"
- cd $project_home/job/job
- mvn clean package -DskipTests=true
- echo "BUILD-MQ"
- cd $project_home/mq
- mvn clean package -DskipTests=true
- echo "DB-JDBC"
- cd $project_home/db/jdbc
- mvn clean package -DskipTests=true
- echo "DB-MYBATIS"
- cd $project_home/db/mybatis
- mvn clean package -DskipTests=true
notifications:
email:
recipients:
- zzhang_xz@163.com
on_success: always # default: change
on_failure: always # default: always
env:
travis_wait: 50
encrypt_module_name: boot-encrypt
project_home: $PWD
commit_id: 000
image_tag: 000
global:
- GH_REF=git@github.com:Alice52/tutorials-sample.git