forked from Nakebenihime/android-springboot-crud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
54 lines (49 loc) · 1.45 KB
/
.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
stages:
- build
- deploy
cache:
paths:
- $CI_PROJECT_DIR/.m2/repository
variables:
MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true"
maven_build_job:
stage: build
image: maven:3.6.3-jdk-11-slim
only:
changes:
- android-springboot-backend/**/*
script:
- mvn $MAVEN_CLI_OPTS clean package -f ./android-springboot-backend/pom.xml -DskipTests
artifacts:
when: on_success
expire_in: 50 min
paths:
- android-springboot-backend/target/*.jar
deploy_qualification_job:
stage: deploy
image: ruby:latest
script:
- apt-get update -qy
- apt-get install -y ruby-dev
- gem install dpl
- dpl --provider=heroku --app=$HEROKU_APP_QUALIFICATION --api-key=$HEROKU_API_KEY
environment:
name: gitlab-heroku-env-qual
url: $HEROKU_APP_HOST
only:
- master
deploy_production_job:
stage: deploy
image: ruby:latest
script:
- apt-get update -qy
- apt-get install -y ruby-dev
- gem install dpl
- dpl --provider=heroku --app=$HEROKU_APP_PRODUCTION --api-key=$HEROKU_API_KEY
environment:
name: gitlab-heroku-env-prod
url: $HEROKU_APP_HOST
when: manual
only:
- master