-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
54 lines (48 loc) · 898 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
image: gradle:alpine
variables:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
GIT_STRATEGY: clone
before_script:
- chmod +x ./gradlew
- export GRADLE_USER_HOME=`pwd`/.gradle
#build pipeline
build:
stage: build
tags:
- grad
script: ./gradlew --build-cache assemble
only:
- master
cache:
key: "$CI_COMMIT_REF_NAME"
policy: push
paths:
- build
- .gradle
#test pipeline
test:
stage: test
tags:
- grad
script: ./gradlew check
only:
- master
cache:
key: "$CI_COMMIT_REF_NAME"
policy: pull
paths:
- build
- .gradle
#deploy pipeline
deploy:
stage: deploy
tags:
- dalfcs_gitlab_docker_ci
image: ruby:2.3
script:
- apt-get update -qy
- apt-get install -y ruby-dev
- gem install dpl
- dpl --provider=heroku --app=$HEROKU_APP_PROD --api-key=$HEROKU_API_KEY
only:
- master