diff --git a/src/main/python/ddadevops/infrastructure/infrastructure.py b/src/main/python/ddadevops/infrastructure/infrastructure.py index 3279430..40fee1b 100644 --- a/src/main/python/ddadevops/infrastructure/infrastructure.py +++ b/src/main/python/ddadevops/infrastructure/infrastructure.py @@ -213,7 +213,7 @@ class ArtifactDeploymentApi: self.execution_api = ExecutionApi() def post_release(self, target_url: str, tag: str, token: str): - self.execution_api.execute_secure(f'curl -X "POST" "{target_url}" ' + return self.execution_api.execute_secure(f'curl -X "POST" "{target_url}" ' + '-H "accept: application/json" -H "Content-Type: application/json" ' + f'-d "{{ "body": "Provides files for release {tag} Attention: The "Source Code"-files below are not up-to-date!", "tag_name": "{tag}"}}" ' # noqa: E501 + f'-H "Authorization: token {token}"', @@ -222,7 +222,7 @@ class ArtifactDeploymentApi: + f'-d "{{ "body": "Provides files for release {tag} Attention: The "Source Code"-files below are not up-to-date!", "tag_name": "{tag}"}}" ') # noqa: E501 def post_asset(self, target_url: str, release_id: str, attachment: str, attachment_type: str, token: str): - self.execution_api.execute_secure(f'curl -X "POST" "{target_url}/{release_id}/assets" ' # {target_url}/{release_id}/assets move to Domain + return self.execution_api.execute_secure(f'curl -X "POST" "{target_url}/{release_id}/assets" ' # {target_url}/{release_id}/assets move to Domain + f'-H "accept: application/json" -H "Authorization: token {token}" ' + '-H "Content-Type: multipart/form-data" ' + f'-F "attachment=@{attachment};type={attachment_type}"',