parent
2c36c12b93
commit
f6ad5451a1
1 changed files with 26 additions and 15 deletions
|
@ -115,7 +115,8 @@ 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(
|
_try_call(lambda: self._phab.harbormaster.sendmessage(
|
||||||
buildTargetPHID=phid,
|
buildTargetPHID=phid,
|
||||||
type=result_type,
|
type=result_type,
|
||||||
|
@ -123,13 +124,23 @@ class PhabTalk:
|
||||||
lint=lint_messages))
|
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):
|
||||||
_try_call(lambda: self._phab.harbormaster.createartifact(
|
|
||||||
buildTargetPHID=phid,
|
|
||||||
artifactKey=str(uuid.uuid4()),
|
artifactKey=str(uuid.uuid4()),
|
||||||
artifactType='uri',
|
artifactType='uri',
|
||||||
artifactData={'uri': '{}/{}'.format(results_url, file),
|
artifactData={'uri': '{}/{}'.format(results_url, file),
|
||||||
'ui.external': True,
|
'ui.external': True,
|
||||||
'name': name}))
|
'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(
|
||||||
|
buildTargetPHID=phid,
|
||||||
|
artifactKey=artifactKey,
|
||||||
|
artifactType=artifactType,
|
||||||
|
artifactData=artifactData))
|
||||||
|
|
||||||
|
|
||||||
def _parse_patch(patch) -> List[Dict[str, str]]:
|
def _parse_patch(patch) -> List[Dict[str, str]]:
|
||||||
|
|
Loading…
Add table
Reference in a new issue