-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitlab-ci.yml
72 lines (66 loc) · 1.42 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
workflow:
rules:
- if: $CI_COMMIT_MESSAGE =~ /-doc$/
when: never
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
variables:
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
HTTP_PROXY: http://fifi:8080/
HTTPS_PROXY: http://fifi:8080/
NO_PROXY: "docker:2375,docker:2376"
stages:
- test
- build
- deploy
image:
name: python:3.8
before_script:
- pip install poetry
- poetry config virtualenvs.create false
- poetry config pypi-token.pypi ${PYPI_TOKEN}
- poetry update
- poetry install
test:
stage: test
only:
refs:
- master
- coladay
- jwv
services:
- mariadb:latest
variables:
MYSQL_ROOT_PASSWORD: mariadb
MYSQL_DATABASE: apisdb
MYSQL_USER: mariadb
MYSQL_PASSWORD: mariadb
script:
- export DATABASE_URL=mysql://root:$MYSQL_ROOT_PASSWORD@mariadb:3306/$MYSQL_DATABASE
- poetry run python manage.py migrate
- poetry run python manage.py test
build:
only:
refs:
- pipelines
- triggers
- master
stage: build
tags:
- cluster
script:
- poetry run bash checkandbump.sh
- poetry publish --build
trigger_build:
only:
refs:
- master
- jwv
- coladay
stage: deploy
trigger: acdh-oeaw/apis/apis-docker
variables:
APIS_TRIGGERD_BY: 'apis-core'
APIS_VERSION: '0.9'