.gitlab-ci.yml 3.02 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-----\nb3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABFwAAAAdzc2gtcn\nNhAAAAAwEAAQAAAQEA4JOpR80yOl4aRiAnbb225zDBVh1B23+AiDao3TxQA7aZOzgnlNmG\nRIUsYv3Gw2Tqki7wjX28jh8D761zthOv83libNdZw1LYqQhCi2pDgmd+IoL7jGUxTcmHdH\nTty/vmNZlLlegqnAgaLgnH9CX2HainNbxEnNrdyNooxXHEFWR4HNJHh4ueRlsFX2OqOxJg\nc2VgEYGQBc8ikGoT1gVFarytWPt02/whZVYm7yxmSRTjwxiD1NZgD2s+l6bYZDPpqoZ+HX\nLrZcBSzAvbygAcRg+m4fUe4TJBQxoHtbZR/p++VZek5FrpmFcveX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WYtLLRDMvCrSeJtCh32z8Ws\nzf5HSYZsfq8pFuYfm+eTnQcpkkTH4n+itPR05JBL9CE7JE0QAAAIEA42YDQ/QBFYmT3+d0\nH1CeKjCyE7FfJgek8M3cjgZm9xv79Uo3xuZrgoQiBu2VJlvIDddFehQg83pBD0b3UBcCFR\ngVcSYry87IkzGAY6KumzQzxNKxM9PMshFcy5r1sDXWJk1KHyHEqhzV25L0jm/3+HX3VOLd\nS74zTYCdTsqiMicAAAAUbHN0ZWluZXJ0QGJhcnRpbWFldXMBAgMEBQYH\n-----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
          #        - printf '%s\n' "$SSH_PRIVATE_KEY" | ssh-add -
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
31
        - echo -e "$SSH_PRIVATE_KEY"
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
32
        - echo "$SSH_PRIVATE_KEY" | ssh-add -
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
33
        - mkdir -p ~/.ssh
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
34
        - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
35
    script:
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
36 37 38 39
        - python bin/generate_fallback.py
        - git add share/fsr share/fsr_extern
        - git commit -m "updated fallbackfiles"
        - git push origin HEAD:master