forked from sogno-platform/cimpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
75 lines (65 loc) · 1.78 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
variables:
DOCKER_TAG_DEV: ${CI_COMMIT_REF_NAME}
DOCKER_IMAGE_DEV: cimpy
DOCKER_FILE: ${CI_PROJECT_DIR}/Dockerfile
stages:
- prepare
- test
- generate
- deploy
prepare:
variables:
GIT_SUBMODULE_STRATEGY: none
stage: prepare
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [ "" ]
script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context ${CI_PROJECT_DIR} --dockerfile ${DOCKER_FILE} --destination ${CI_REGISTRY_IMAGE}:${DOCKER_IMAGE_DEV}-base-image --cache=true --snapshotMode=redo --use-new-run
text-documentation:
stage: generate
script:
- cd documentation && ./docu.sh
image: ${CI_REGISTRY_IMAGE}:${DOCKER_IMAGE_DEV}-base-image
except:
- master
needs: ['prepare']
html-documentation:
stage: generate
script:
- cd documentation && ./docu.sh --release
image: ${CI_REGISTRY_IMAGE}:${DOCKER_IMAGE_DEV}-base-image
artifacts:
paths:
- documentation
only:
- master
needs: ['prepare']
pages:
stage: deploy
script:
- mkdir .public
- cp -r documentation/_build/html/. .public
- mv .public public
artifacts:
paths:
- public
- .public
dependencies:
- html-documentation
only:
- master
needs: ['html-documentation']
test:
stage: test
variables:
PYTHONPATH: "build/Source/Python:Source/Python"
script:
- pytest -v -cov --junitxml=report.xml
image: ${CI_REGISTRY_IMAGE}:${DOCKER_IMAGE_DEV}-base-image
artifacts:
reports:
junit: report.xml
needs: ['prepare']