Build config using bash script
This commit is contained in:
parent
bb3737b1a3
commit
946dbd22e6
2 changed files with 8 additions and 10 deletions
|
@ -23,15 +23,8 @@ before_script:
|
||||||
- ssh-keyscan $CI_REPO_HOST | tee ~/.ssh/known_hosts
|
- ssh-keyscan $CI_REPO_HOST | tee ~/.ssh/known_hosts
|
||||||
- chmod 644 ~/.ssh/known_hosts
|
- chmod 644 ~/.ssh/known_hosts
|
||||||
## get API token from secret variable
|
## get API token from secret variable
|
||||||
- echo "\
|
- ./build-config.sh
|
||||||
[global]
|
- cp python-gitlab.cfg $HOME/.python-gitlab.cfg
|
||||||
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
|
- python3 setup.py install
|
||||||
|
|
||||||
deadlines:
|
deadlines:
|
||||||
|
|
7
python-gitlab.cfg → build-config.sh
Normal file → Executable file
7
python-gitlab.cfg → build-config.sh
Normal file → Executable file
|
@ -1,7 +1,12 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
cat > python-gitlab.cfg <<EOF
|
||||||
[global]
|
[global]
|
||||||
default = default
|
default = default
|
||||||
ssl_verify = true
|
ssl_verify = true
|
||||||
|
|
||||||
[default]
|
[default]
|
||||||
url = $(echo ${CI_PROJECT_URL} | cut -d '/' -f -3)
|
url = $(echo ${CI_PROJECT_URL} | cut -d '/' -f -3)
|
||||||
api_version = 4
|
api_version = 4
|
||||||
|
private_token = ${PRIVATE_API_TOKEN}
|
||||||
|
EOF
|
Loading…
Add table
Add a link
Reference in a new issue