Skip to content

Commit

Permalink
allow artifact download work with snake-oil certs too by default
Browse files Browse the repository at this point in the history
  • Loading branch information
LifeDJIK committed Jan 23, 2024
1 parent 4bb0ad4 commit e7f506a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions dusty/tools/actions/galloper_artifact/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ def run(self):
#
obj_url = f"{os.environ.get('galloper_url')}/api/v1/artifacts/artifact/" \
f"{os.environ.get('project_id')}/{bucket}/{srcobj}"
data = requests.get(obj_url, headers=headers).content
data = requests.get(
obj_url,
headers=headers,
verify=self.config.get("ssl_verify", False),
).content
# Extract data
os.makedirs(target, exist_ok=True)
src_zip = zipfile.ZipFile(io.BytesIO(data))
Expand All @@ -62,7 +66,11 @@ def run(self):
if self.config.get("delete", False):
delete_url = f"{os.environ.get('galloper_url')}/api/v1/artifacts/artifact/" \
f"{os.environ.get('project_id')}/{bucket}/{srcobj}"
requests.delete(delete_url, headers=headers)
requests.delete(
delete_url,
headers=headers,
verify=self.config.get("ssl_verify", False),
)

@staticmethod
def fill_config(data_obj):
Expand Down

0 comments on commit e7f506a

Please sign in to comment.