Commit afe1dbf9 authored by Nico's avatar Nico
Browse files

use WGET for downloading

WGET can retry automatically, so use it.
parent 04ef4022
......@@ -84,11 +84,12 @@ pipeline_jobs_request.raise_for_status()
pipeline_jobs = pipeline_jobs_request.json()
for job in pipeline_jobs:
if job["name"] == "package":
with tempfile.TemporaryFile() as artifact_temp:
with requests.get("{}/projects/{}/jobs/{}/artifacts".format(GITLAB_API_BASE, PROJECT_ID, job["id"]), stream=True) as artifact_request:
for chunk in artifact_request.iter_content(chunk_size=1024*1024):
with tempfile.NamedTemporaryFile() as artifact_temp:
artifact_url = "{}/projects/{}/jobs/{}/artifacts".format(GITLAB_API_BASE, PROJECT_ID, job["id"])
logging.debug("Starting download via wget of URL '{}'".format(artifact_url))
wget_process =["wget", "-O" +, artifact_url], encoding='utf-8')
if wget_process.returncode != 0:
downloaded_version = extract_zip(artifact_temp)
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