-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
62 lines (50 loc) · 869 Bytes
/
.gitlab-ci.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
image: maven:3.3-jdk-8-alpine
cache:
key: "$CI_PROJECT_NAMESPACE $CI_PROJECT_NAME"
paths:
- .m2/
stages:
- test
- build
- deploy
unit_test:
stage: test
script:
- mvn clean test -B
check_style:
stage: test
script:
- mvn clean checkstyle:check -B
.build: &build_template
stage: build
script:
- mvn package -B
develop_build:
<<: *build_template
only:
- branches
except:
- master
artifacts:
expire_in: 1 day
paths:
- target/*.jar
master_build:
<<: *build_template
only:
- master
- tags
artifacts:
expire_in: 1 month
paths:
- target/*.jar
deploy:
stage: deploy
image: ruby:latest
script:
- apt-get update -qy
- apt-get install -y ruby-dev
- gem install dpl
- dpl --provider=heroku --app=testeritto --api-key=$HEROKU_API_KEY
only:
- dev