Commit 9257533c authored by Maximilian Schanner's avatar Maximilian Schanner
Browse files

Try curl timeouts, as the runner connection appears instable.

parent 52b7c2cd
......@@ -19,10 +19,10 @@ build-job:
- python3 setup.py sdist bdist_wheel
- apt-get install -y -qq curl --fix-missing
# get the current package id
- 'export ID=$(curl --request GET --header "PRIVATE-TOKEN: ${API_ACCES_TOKEN}" "https://git.gfz-potsdam.de/api/v4/projects/${CI_PROJECT_ID}/packages" | grep -P "(?<=.id.:)(\\d+)" -o | head -1)'
- 'export ID=$(curl --max-time 900 --connect-timeout 120 --request GET --header "PRIVATE-TOKEN: ${API_ACCES_TOKEN}" "https://git.gfz-potsdam.de/api/v4/projects/${CI_PROJECT_ID}/packages" | grep -P "(?<=.id.:)(\\d+)" -o | head -1)'
# remove the package, as we want a new build even if the version number did not change
- 'echo $ID'
- 'curl --request DELETE --header "PRIVATE-TOKEN: ${API_ACCES_TOKEN}" "https://git.gfz-potsdam.de/api/v4/projects/${CI_PROJECT_ID}/packages/$ID"'
- 'curl --max-time 900 --connect-timeout 120 --request DELETE --header "PRIVATE-TOKEN: ${API_ACCES_TOKEN}" "https://git.gfz-potsdam.de/api/v4/projects/${CI_PROJECT_ID}/packages/$ID"'
# upload
- TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python3 -m twine upload --repository-url https://git.gfz-potsdam.de/api/v4/projects/${CI_PROJECT_ID}/packages/pypi dist/* --verbose
only:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment