Build config using bash script

This commit is contained in:
Tim Schubert 2018-09-21 12:46:11 +02:00
parent bb3737b1a3
commit 946dbd22e6
2 changed files with 8 additions and 10 deletions

View file

@ -23,15 +23,8 @@ before_script:
- ssh-keyscan $CI_REPO_HOST | tee ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
## get API token from secret variable
- 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
- ./build-config.sh
- cp python-gitlab.cfg $HOME/.python-gitlab.cfg
- python3 setup.py install
deadlines:

5
python-gitlab.cfg → build-config.sh Normal file → Executable file
View file

@ -1,3 +1,6 @@
#!/bin/sh
cat > python-gitlab.cfg <<EOF
[global]
default = default
ssl_verify = true
@ -5,3 +8,5 @@ ssl_verify = true
[default]
url = $(echo ${CI_PROJECT_URL} | cut -d '/' -f -3)
api_version = 4
private_token = ${PRIVATE_API_TOKEN}
EOF