abgabesystem/.gitlab-ci.yml
2018-05-17 15:51:30 +02:00

59 lines
972 B
YAML

image: $CI_REGISTRY/abgabesystem/abgabesystem:latest
variables:
BASECODE: test_solutions
stages:
- sync
- deadlines
- plagiates
before_script:
## get ssh private key from secret variable
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
## get API token from secret variable
- cp python-gitlab.cfg $HOME/.python-gitlab.cfg
- echo "private_token = ${PRIVATE_API_TOKEN}" >> $HOME/.python-gitlab.cfg
deadlines:
stage: deadlines
tags:
- abgabesystem
script:
- python3 abgabesystem.py deadline $CI_COMMIT_REF_NAME
only:
- tags
plagiates:
stage: plagiates
tags:
- abgabesystem
script:
- python3 abgabesystem.py plagiates $CI_COMMIT_REF_NAME
artifacts:
paths:
- results/
only:
- tags
sync:
stage: sync
tags:
- abgabesystem
script:
- python3 abgabesystem.py sync
only:
- master
except:
- tags