-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
56 lines (49 loc) · 1.12 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
55
56
stages:
- docker
- cache
- test
- deploy
variables:
REGISTRY: registry.gitlab.com
IMAGE: $REGISTRY/taig-github/color
DOCKER_DRIVER: overlay2
SBT: sbt -v -sbt-launch-dir ./cache/launchers -Dsbt.global.base=./cache/sbt -Dsbt.boot.directory=./cache/boot -Dsbt.ivy.home=./cache/ivy -Dsbt.coursier.home=./cache/coursier -Dmode=strict
cache: &cache
key: global
paths:
- ./cache/
- ./**/target/
policy: pull
docker:
stage: docker
image: docker
services:
- docker:dind
script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $REGISTRY
- docker pull $IMAGE:latest || true
- docker build --cache-from $IMAGE:latest --tag $IMAGE:latest .
- docker push $IMAGE:latest
cache: {}
dependencies:
stage: cache
image: $IMAGE:latest
script: $SBT +test:compile
cache:
<<: *cache
policy: pull-push
formatting:
stage: test
image: $IMAGE:latest
script: $SBT scalafmtCheckAll
unit tests:
stage: test
image: $IMAGE:latest
script: $SBT +test +publishLocal
artifacts:
stage: deploy
image: $IMAGE:latest
script: $SBT publishAndRelease
only:
- master
- tags