From a9438a8eaff82f9a4a4f73224d84d4d992d68d64 Mon Sep 17 00:00:00 2001 From: Tim Schubert Date: Thu, 17 May 2018 15:51:30 +0200 Subject: [PATCH] Import ssh key --- .gitlab-ci.yml | 6 ++++++ abgabesystem.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f5aaf6f..b8593eb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,6 +9,12 @@ stages: - 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 diff --git a/abgabesystem.py b/abgabesystem.py index beb22ff..a7a11bf 100644 --- a/abgabesystem.py +++ b/abgabesystem.py @@ -241,7 +241,7 @@ def plagiates(gl, conf, args): os.chdir('..') subprocess.run( - ['java', '-jar', '/app/jplag.jar', '-s', 'repos', '-p', 'java', '-r', 'results', '-bc', '$BASECODE', '-l', 'java18']) + ['java', '-jar', '/app/jplag.jar', '-s', 'repos', '-p', 'java', '-r', 'results', '-bc', '$BASECODE', '-l', 'java17']) def parseconf(conf):