-
Notifications
You must be signed in to change notification settings - Fork 0
/
sample-gitlab-ci.yml
52 lines (45 loc) · 957 Bytes
/
sample-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
mage: openjdk:8-jre
variables:
GIT_SUBMODULE_STRATEGY: recursive
DOCKER_DRIVER: overlay2
MOUNT_POINT: /builds/$CI_PROJECT_PATH/mnt
DOCKER_HOST: tcp://localhost:2375
cache:
paths:
- ~/.ivy/cache
stages:
- build
- deploy_int
- deploy_production
before_script:
- source ci-utils/ci-utils.sh
- builder_image_update
build:
tags:
- shell-gitlab-runner
services:
- docker:dind
stage: build
script:
- builder_image_install_sbt
- builder_image_install_docker
- sbt clean compile package docker
- docker_image_push src/main/k8s/deployment.yml
deploy_stage:
tags:
- shell-gitlab-runner
stage: deploy_stage
script:
- kube_deploy_and_wait stage src/main/k8s/deployment.yml
when: manual
only:
- master
deploy_production:
tags:
- shell-gitlab-runner
stage: deploy_production
script:
- kube_deploy_and_wait production src/main/k8s/deployment.yml
when: manual
only:
- master