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