-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
52 lines (47 loc) · 979 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
stages:
- build
- test
- deploy
default:
tags:
- dalfcs_gitlab_docker_ci
buildProject:
stage: build
image: gradle
script:
- ./gradlew --no-daemon assemble
testProject:
stage: test
image: gradle
script:
- ./gradlew --no-daemon test
artifacts:
when: always
reports:
junit: build/test-results/test/**/TEST-*.xml
deployStaging:
stage: deploy
image: ruby:latest
when: on_success
only:
refs:
- develop
before_script:
- apt-get -qy update
- apt-get install -qy ruby-dev
- gem install dpl
script:
- dpl --cleanup --provider=heroku --api_key=$HEROKU_API_KEY --app=$HEROKU_STAGING_APP_NAME
deployProduction:
stage: deploy
image: ruby:latest
only:
refs:
- master
when: on_success
before_script:
- apt-get -qy update
- apt-get install -qy ruby-dev
- gem install dpl
script:
- dpl --cleanup --provider=heroku --api_key=$HEROKU_API_KEY --app=$HEROKU_PROD_APP_NAME