.gitlab-ci.yml 2.93 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

fallbackfiles:
    only:
        - schedules
    image: python:3.6-alpine
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
21
    variables:
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
22
        SSH_PRIVATE_KEY: "-----BEGIN OPENSSH PRIVATE KEY-----b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABFwAAAAdzc2gtcnNhAAAAAwEAAQAAAQEA4JOpR80yOl4aRiAnbb225zDBVh1B23+AiDao3TxQA7aZOzgnlNmGRIUsYv3Gw2Tqki7wjX28jh8D761zthOv83libNdZw1LYqQhCi2pDgmd+IoL7jGUxTcmHdHTty/vmNZlLlegqnAgaLgnH9CX2HainNbxEnNrdyNooxXHEFWR4HNJHh4ueRlsFX2OqOxJgc2VgEYGQBc8ikGoT1gVFarytWPt02/whZVYm7yxmSRTjwxiD1NZgD2s+l6bYZDPpqoZ+HXLrZcBSzAvbygAcRg+m4fUe4TJBQxoHtbZR/p++VZek5FrpmFcveXck3pi58166dnWvMs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QcpkkTH4n+itPR05JBL9CE7JE0QAAAIEA42YDQ/QBFYmT3+d0H1CeKjCyE7FfJgek8M3cjgZm9xv79Uo3xuZrgoQiBu2VJlvIDddFehQg83pBD0b3UBcCFRgVcSYry87IkzGAY6KumzQzxNKxM9PMshFcy5r1sDXWJk1KHyHEqhzV25L0jm/3+HX3VOLdS74zTYCdTsqiMicAAAAUbHN0ZWluZXJ0QGJhcnRpbWFldXMBAgMEBQYH-----END OPENSSH PRIVATE KEY-----"
23
    before_script:
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
24
        - export
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
25
        - apk add git openssh-client bash
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
26 27 28
        - 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
29
        - eval $( ssh-agent -s )
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
30 31
        - printf '%s\n' "$SSH_PRIVATE_KEY" | ssh-add -
          #        - echo "$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 37 38
        - python bin/generate_fallback.py
        - git add share/fsr share/fsr_extern
        - git commit -m "updated fallbackfiles"
        - git push origin HEAD:master