Skip to content

Commit 17a1a3b

Browse files
committed
add project parameter for build api
1 parent e0d30c3 commit 17a1a3b

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

artifactory.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2902,7 +2902,7 @@ def builds(self):
29022902
all_builds = []
29032903
url = ""
29042904
if self.project:
2905-
url = f"?project='{self.project}'"
2905+
url = f"?project={self.project}"
29062906

29072907
resp = self._get_build_api_response(url)
29082908
if "builds" in resp:
@@ -2955,6 +2955,8 @@ def _get_info(self, build_name, build_number=""):
29552955
if build_number:
29562956
build_number = urllib.parse.quote(str(build_number), safe="")
29572957
url += f"/{build_number}"
2958+
if self.project:
2959+
url += f'?project={self.project}'
29582960
return self._get_build_api_response(url)
29592961

29602962
def _get_build_api_response(self, url):
@@ -3037,6 +3039,10 @@ def promote_build(
30373039
"properties": properties,
30383040
"failFast": fail_fast,
30393041
}
3042+
3043+
if self.project:
3044+
json_data["prjoect"] = self.project
3045+
30403046
if source_repo:
30413047
json_data["sourceRepo"] = source_repo
30423048

0 commit comments

Comments
 (0)