.gitlab-ci.yml 1.2 KB
Newer Older
Lorenz Steinert's avatar
Lorenz Steinert committed
1
test:
2 3
    except:
        - schedules
Lorenz Steinert's avatar
Lorenz Steinert committed
4
    image: python:3.6-alpine
Lorenz Steinert's avatar
Lorenz Steinert committed
5
    before_script:
Lorenz Steinert's avatar
bal  
Lorenz Steinert committed
6
        - pip install ldap3
Lorenz Steinert's avatar
Lorenz Steinert committed
7 8
    script:
        - python bin/module/test.py
Lorenz Steinert's avatar
Lorenz Steinert committed
9 10

syntax:
11 12
    except:
        - schedules
Lorenz Steinert's avatar
bla  
Lorenz Steinert committed
13
    image: debian:stretch
Lorenz Steinert's avatar
bla  
Lorenz Steinert committed
14
    before_script:
Lorenz Steinert's avatar
Lorenz Steinert committed
15 16 17 18
        - apt update > /dev/null
        - apt install -y python-flake8 flake8 > /dev/null
    script:
        - /usr/bin/flake8 --exclude .git,__pycache__,bin/module/test.py
19 20 21 22 23 24

fallbackfiles:
    only:
        - schedules
    image: python:3.6-alpine
    before_script:
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
25
        - export
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
26
        - apk add git openssh-client bash
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
27 28 29
        - git config --global user.email "protokoll@fs.physik.uni-kl.de"
        - git config --global user.name "Protobot"
        - pip install ldap3
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
30
        - eval $( ssh-agent -s )
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
31
        - echo -e "$SSH_PRIVATE_KEY" | ssh-add -
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
32
        - mkdir -p ~/.ssh
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
33
        - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
34
    script:
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
35 36
        - python bin/generate_fallback.py
        - git add share/fsr share/fsr_extern
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
37
        - '[ ! -z "$(git status --porcelain)" ] && git commit -m "updated fallbackfiles"'
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
38
        - git push git@gitlab.rlp.net:fsr_physik_tu_kl/protokoll/protokoll_skript.git HEAD:master