-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
90 lines (85 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
stages:
- test
- deploy
- tf_apply
test & assembly:
stage: test
image: hseeberger/scala-sbt:8u181_2.12.8_1.2.8
script:
- >-
sbt
-sbt-dir .sbt
-ivy .ivy2
-mem 2048
app/assembly
cache:
paths:
- .sbt
- .ivy2
artifacts:
paths:
- target/scala-2.12/t99.jar
expire_in: 30 days
scalafmt:
stage: test
image: hseeberger/scala-sbt:8u181_2.12.8_1.2.8
script:
- >-
sbt
-sbt-dir .sbt
-ivy .ivy2
-mem 2048
scalafmt::test
test:scalafmt::test
sbt:scalafmt::test
cache:
paths:
- .sbt
- .ivy2
terraform plan:
stage: test
image:
name: hashicorp/terraform:0.11.13
entrypoint: [""]
script:
- cd terraform
- terraform init
- terraform fmt -check=true -diff=true
- terraform validate
- terraform plan
cache:
paths:
- terraform/.terrafrom
artifacts:
paths:
- terraform/.terraform
expire_in: 1 week
deploy prod:
stage: deploy
image:
name: nomadblacky/serverless:1.39.1
entrypoint:
- ""
environment:
name: production
before_script:
- npm install --save-dev serverless-plugin-tracing
script:
- serverless deploy --stage prod
cache:
paths:
- node_modules/
only:
- master
terraform apply:
stage: tf_apply
dependencies:
- terraform plan
image:
name: hashicorp/terraform:0.11.13
entrypoint: [""]
script:
- cd terraform
- terraform apply
only:
- master