-
Notifications
You must be signed in to change notification settings - Fork 6
/
.gitlab-ci.yml
69 lines (61 loc) · 1.6 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
stages:
- test
- build image
- deploy
variables:
DOCKER_TLS_CERTDIR: ""
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
MYSQL_ROOT_PASSWORD: "root"
MYSQL_DATABASE: "ota_tuf"
MYSQL_USER: "ota_tuf"
MYSQL_PASSWORD: "ota_tuf"
SBT_OPTS: "-sbt-launch-dir .sbt/launchers -sbt-dir .sbt -ivy .ivy2 -Dsbt.color=true -Dscala.color=true"
SERVICE: tuf-server
image: registry.gitlab.com/torizon-platform/ci-container-build:scala-jvm17-0.0.5
include:
- project: torizon-platform/ci-container-build
file: gitlab-ci-templates/gitlab-sbt-docker-publish.yaml
ref: master
- project: 'torizon-platform/deploy-env'
ref: master
file: '/gitlab/deploy-core-service.yml'
services:
- name: docker:dind
default:
cache:
key: tuf
paths:
- .ivy2/
- .sbt/
test:
stage: test
rules:
- if: $CI_COMMIT_REF_NAME == "master"
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
services:
- name: uptane/tuf-nginx:latest
alias: tuf-nginx
- name: mariadb:10.11
alias: db
command:
- --character-set-server=utf8
- --collation-server=utf8_unicode_ci
- --max_connections=1000
variables:
DB_URL: "jdbc:mariadb://db:3306/ota_tuf"
MTLS_REPOSERVER_URI: "https://tuf-nginx:8181/"
before_script:
- ./deploy/gitlab-db-setup.sh mysql db
script:
- sbt ut:test
build docker image tuf-server:
stage: build image
rules:
- if: $CI_COMMIT_REF_NAME == "master"
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
extends:
- .sbt-docker-publish
variables:
SERVICE_NAME: tuf-server
SBT_NAME: tuf_server/