-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
51 lines (42 loc) · 960 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
default:
image: maven:3.8-openjdk-11
before_script:
- apt-get update -qy
- apt-get install -y ruby-dev
- gem install dpl
stages:
- build
- test
- deploy
build:
stage: build
script:
- mvn package -Dmaven.test.skip
artifacts:
paths:
- target/*.jar
test:
image: markhobson/maven-chrome:jdk-11
needs: [build]
stage: test
script:
- mvn surefire-report:report site -DgenerateReports=false
artifacts:
paths:
- "target/site"
expire_in: 30 days
staging:
image: markhobson/maven-chrome:jdk-11
needs: [test]
stage: deploy
script:
- dpl --provider=heroku --app=$HEROKU_APP_STAGING --api_key=$HEROKU_API_KEY
- SPRING_PROFILES_ACTIVE='staging' HOST='https://${HEROKU_APP_STAGING}.herokuapp.com' mvn clean test
production:
stage: deploy
needs: [test]
when: manual
script:
- dpl --provider=heroku --app=$HEROKU_APP_PRODUCTION --api_key=$HEROKU_API_KEY
only:
- main