.gitlab-ci.yml 1.13 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
    script: python bin/module/test.py
Lorenz Steinert's avatar
Lorenz Steinert committed
8 9

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

fallbackfiles:
    only:
        - schedules
    image: python:3.6-alpine
    before_script:
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
22
        - export
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
23
        - apk add git openssh-client bash
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
24 25 26
        - 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
27
        - eval $( ssh-agent -s )
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
28 29
        - printf '%s\n' "$SSH_PRIVATE_KEY" | ssh-add -
          #        - echo "$SSH_PRIVATE_KEY" | ssh-add -
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
30
        - mkdir -p ~/.ssh
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
31
        - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
32
    script:
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
33 34 35 36
        - python bin/generate_fallback.py
        - git add share/fsr share/fsr_extern
        - git commit -m "updated fallbackfiles"
        - git push origin HEAD:master