.gitlab-ci.yml 3 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
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
NhAAAAAwEAAQAAAQEA4JOpR80yOl4aRiAnbb225zDBVh1B23+AiDao3TxQA7aZOzgnlNmG
RIUsYv3Gw2Tqki7wjX28jh8D761zthOv83libNdZw1LYqQhCi2pDgmd+IoL7jGUxTcmHdH
Tty/vmNZlLlegqnAgaLgnH9CX2HainNbxEnNrdyNooxXHEFWR4HNJHh4ueRlsFX2OqOxJg
c2VgEYGQBc8ikGoT1gVFarytWPt02/whZVYm7yxmSRTjwxiD1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SeK3ysgKt3GqDbD
vRSRTuEN3eH3XhXoOHzha04qwv7yiLtzfdE4ZC7brNAUugSWYtLLRDMvCrSeJtCh32z8Ws
zf5HSYZsfq8pFuYfm+eTnQcpkkTH4n+itPR05JBL9CE7JE0QAAAIEA42YDQ/QBFYmT3+d0
H1CeKjCyE7FfJgek8M3cjgZm9xv79Uo3xuZrgoQiBu2VJlvIDddFehQg83pBD0b3UBcCFR
gVcSYry87IkzGAY6KumzQzxNKxM9PMshFcy5r1sDXWJk1KHyHEqhzV25L0jm/3+HX3VOLd
S74zTYCdTsqiMicAAAAUbHN0ZWluZXJ0QGJhcnRpbWFldXMBAgMEBQYH
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
47
-----END OPENSSH PRIVATE KEY-----'
48
    before_script:
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
49
        - export
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
50
        - apk add git openssh-client bash
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
51 52 53
        - 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
54
        - eval $( ssh-agent -s )
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
55
          #        - printf '%s\n' "$SSH_PRIVATE_KEY" | ssh-add -
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
56
        - echo -e "$SSH_PRIVATE_KEY"
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
57
        - echo "$SSH_PRIVATE_KEY" | ssh-add -
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
58
        - mkdir -p ~/.ssh
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
59
        - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
60
    script:
Lorenz Steinert's avatar
test  
Lorenz Steinert committed
61 62 63 64
        - python bin/generate_fallback.py
        - git add share/fsr share/fsr_extern
        - git commit -m "updated fallbackfiles"
        - git push origin HEAD:master