parent
2c36c12b93
commit
f6ad5451a1
1 changed files with 26 additions and 15 deletions
|
@ -115,21 +115,32 @@ class PhabTalk:
|
||||||
print('type: {}'.format(result_type))
|
print('type: {}'.format(result_type))
|
||||||
print('unit: {}'.format(unit))
|
print('unit: {}'.format(unit))
|
||||||
print('lint: {}'.format(lint_messages))
|
print('lint: {}'.format(lint_messages))
|
||||||
else:
|
return
|
||||||
_try_call(lambda: self._phab.harbormaster.sendmessage(
|
|
||||||
buildTargetPHID=phid,
|
_try_call(lambda: self._phab.harbormaster.sendmessage(
|
||||||
type=result_type,
|
buildTargetPHID=phid,
|
||||||
unit=unit,
|
type=result_type,
|
||||||
lint=lint_messages))
|
unit=unit,
|
||||||
|
lint=lint_messages))
|
||||||
|
|
||||||
def add_artifact(self, phid: str, file: str, name: str, results_url: str):
|
def add_artifact(self, phid: str, file: str, name: str, results_url: str):
|
||||||
|
artifactKey=str(uuid.uuid4()),
|
||||||
|
artifactType='uri',
|
||||||
|
artifactData={'uri': '{}/{}'.format(results_url, file),
|
||||||
|
'ui.external': True,
|
||||||
|
'name': name}
|
||||||
|
if self.dryrun:
|
||||||
|
print('harbormaster.createartifact =================')
|
||||||
|
print('artifactKey: {}'.format(artifactKey))
|
||||||
|
print('artifactType: {}'.format(artifactType))
|
||||||
|
print('artifactData: {}'.format(artifactData))
|
||||||
|
return
|
||||||
|
|
||||||
_try_call(lambda: self._phab.harbormaster.createartifact(
|
_try_call(lambda: self._phab.harbormaster.createartifact(
|
||||||
buildTargetPHID=phid,
|
buildTargetPHID=phid,
|
||||||
artifactKey=str(uuid.uuid4()),
|
artifactKey=artifactKey,
|
||||||
artifactType='uri',
|
artifactType=artifactType,
|
||||||
artifactData={'uri': '{}/{}'.format(results_url, file),
|
artifactData=artifactData))
|
||||||
'ui.external': True,
|
|
||||||
'name': name}))
|
|
||||||
|
|
||||||
|
|
||||||
def _parse_patch(patch) -> List[Dict[str, str]]:
|
def _parse_patch(patch) -> List[Dict[str, str]]:
|
||||||
|
@ -215,10 +226,10 @@ class BuildReport:
|
||||||
def final_report(self):
|
def final_report(self):
|
||||||
if self.buildresult is not None:
|
if self.buildresult is not None:
|
||||||
print('Jenkins result: {}'.format(self.buildresult))
|
print('Jenkins result: {}'.format(self.buildresult))
|
||||||
if self.buildresult.lower() == 'success':
|
if self.buildresult.lower() == 'success':
|
||||||
pass
|
pass
|
||||||
elif self.buildresult.lower() == 'null':
|
elif self.buildresult.lower() == 'null':
|
||||||
self.working = True
|
self.working = True
|
||||||
else:
|
else:
|
||||||
self.success = False
|
self.success = False
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue