62 lines
1 KiB
YAML
62 lines
1 KiB
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
|
|
- ssh-add -l
|
|
- ssh-keyscan localhost | tee ~/.ssh/known_hosts
|
|
- chmod 644 ~/.ssh/known_hosts
|
|
## 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
|