From 3b243d8ddd64b3cece1e30f669da8a7a1ac622f0 Mon Sep 17 00:00:00 2001 From: Tim Schubert Date: Fri, 21 Sep 2018 12:22:40 +0200 Subject: [PATCH] Generic python-gitlab.cfg --- .gitlab-ci.yml | 11 +++++++++-- python-gitlab.cfg | 6 +++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 37ebb14..5369153 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,8 +23,15 @@ before_script: - ssh-keyscan $CI_REPO_HOST | 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 + - echo "\ + [global] + default = default + ssl_verify = true + + [default] + url = $(echo ${CI_PROJECT_URL} | cut -d '/' -f -3) + api_version = 4 + private_token = ${PRIVATE_API_TOKEN}" > $HOME/.python-gitlab.cfg - python3 setup.py install deadlines: diff --git a/python-gitlab.cfg b/python-gitlab.cfg index 50b7e1b..38c4668 100644 --- a/python-gitlab.cfg +++ b/python-gitlab.cfg @@ -1,7 +1,7 @@ [global] -default = ips +default = default ssl_verify = true -[ips] -url = https://ips1.ibr.cs.tu-bs.de +[default] +url = $(echo ${CI_PROJECT_URL} | cut -d '/' -f -3) api_version = 4