Aufgrund einer Wartung wird GitLab am 18.01. zwischen 8:00 und 9:00 Uhr kurzzeitig nicht zur Verfügung stehen. / Due to maintenance, GitLab will be temporarily unavailable on 18.01. between 8:00 and 9:00 am.

.gitlab-ci.yml 2.33 KB
Newer Older
Jan Dinkelbach's avatar
Jan Dinkelbach committed
1
2
variables:
    DOCKER_TAG_DEV: ${CI_COMMIT_REF_NAME}
Jan Dinkelbach's avatar
Jan Dinkelbach committed
3
    DOCKER_IMAGE_DEV: cimpy
4
    DOCKER_FILE: ${CI_PROJECT_DIR}/Dockerfile
5

Jan Dinkelbach's avatar
Jan Dinkelbach committed
6
7
stages:
- prepare
Philipp Reuber's avatar
Philipp Reuber committed
8
- test
Jan Dinkelbach's avatar
Jan Dinkelbach committed
9
- generate
10
- deploy
11

Jan Dinkelbach's avatar
Jan Dinkelbach committed
12

13
14
15
16
17
18
19
20
21
22
23
24
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} --target base --destination ${CI_REGISTRY_IMAGE}:${DOCKER_IMAGE_DEV}-base-image --cache=true --snapshotMode=redo --use-new-run

Jan Dinkelbach's avatar
Jan Dinkelbach committed
25

26
27
28
cached-documentation:
    stage: generate
    script:
29
        - echo "image ${CI_REGISTRY_IMAGE}:${DOCKER_IMAGE_DEV}"
30
        - cd documentation && ./docu.sh
31
    image: ${CI_REGISTRY_IMAGE}:${DOCKER_IMAGE_DEV}
32
33
34
35
36
37
    cache:
        key: secret-cimpy
        paths:
            - documentation
    except:
        - master
Jan Dinkelbach's avatar
Jan Dinkelbach committed
38
39
40
41

documentation:
    stage: generate
    script:
42
        - cd documentation && ./docu.sh
43
    image: ${CI_REGISTRY_IMAGE}:${DOCKER_IMAGE_DEV}
Jan Dinkelbach's avatar
Jan Dinkelbach committed
44
45
    artifacts:
        paths:
Jan Dinkelbach's avatar
fix CI    
Jan Dinkelbach committed
46
            - documentation
47
48
    only:
        - master
Philipp Reuber's avatar
Philipp Reuber committed
49

50

Philipp Reuber's avatar
Philipp Reuber committed
51
pages:
Philipp Reuber's avatar
Philipp Reuber committed
52
53
54
    stage: deploy
    script:
        - mkdir .public
Philipp Reuber's avatar
Philipp Reuber committed
55
        - cp -r documentation/_build/html/. .public
Philipp Reuber's avatar
Philipp Reuber committed
56
57
58
59
        - mv .public public
    artifacts:
        paths:
            - public
Philipp Reuber's avatar
Philipp Reuber committed
60
            - .public
Philipp Reuber's avatar
Philipp Reuber committed
61
62
    dependencies:
        - documentation
63
64
    only:
        - master
Philipp Reuber's avatar
Philipp Reuber committed
65

66
67


68
test:import:
69
    stage: test
70
71
72
    variables:
        PYTHONPATH: "build/Source/Python:Source/Python"
    script:
Philipp Reuber's avatar
fix yml    
Philipp Reuber committed
73
        - python3 setup.py develop
Philipp Reuber's avatar
fix yml    
Philipp Reuber committed
74
        - cd tests && pytest -v test_import.py
75
    image: ${CI_REGISTRY_IMAGE}:${DOCKER_IMAGE_DEV}
76

Jan Dinkelbach's avatar
Jan Dinkelbach committed
77
test:export-against-imported-files:
78
    stage: test
79
80
81
    variables:
        PYTHONPATH: "build/Source/Python:Source/Python"
    script:
Philipp Reuber's avatar
fix yml    
Philipp Reuber committed
82
        - python3 setup.py develop
Philipp Reuber's avatar
fix yml    
Philipp Reuber committed
83
        - cd tests && pytest -v test_export_with_imported_files.py
84
    image: ${CI_REGISTRY_IMAGE}:${DOCKER_IMAGE_DEV}
85

Jan Dinkelbach's avatar
Jan Dinkelbach committed
86
test:export-against-exported-files:
87
    stage: test
Philipp Reuber's avatar
Philipp Reuber committed
88
89
90
    variables:
        PYTHONPATH: "build/Source/Python:Source/Python"
    script:
Philipp Reuber's avatar
fix yml    
Philipp Reuber committed
91
        - python3 setup.py develop
Philipp Reuber's avatar
fix yml    
Philipp Reuber committed
92
        - cd tests && pytest -v test_export_with_exported_files.py
93
    image: ${CI_REGISTRY_IMAGE}:${DOCKER_IMAGE_DEV}