Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93062717
hbm
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Nov 25, 22:16
Size
1 KB
Mime Type
text/x-python
Expires
Wed, Nov 27, 22:16 (2 d)
Engine
blob
Format
Raw Data
Handle
22472559
Attached To
rAKA akantu
hbm
View Options
#!/usr/bin/env python3
import
click
import
harbomaster
@click
.
group
()
@click
.
option
(
'-a'
,
'--api-token'
,
default
=
None
,
envvar
=
'API_TOKEN'
)
@click
.
option
(
'-h'
,
'--host'
,
default
=
None
,
envvar
=
'PHABRICATOR_HOST'
)
@click
.
option
(
'-b'
,
'--build-target-phid'
,
envvar
=
'BUILD_TARGET_PHID'
)
@click
.
pass_context
def
hbm
(
ctx
,
api_token
,
host
,
build_target_phid
):
ctx
.
obj
[
'API_TOKEN'
]
=
api_token
ctx
.
obj
[
'HOST'
]
=
host
ctx
.
obj
[
'BUILD_TARGET_PHID'
]
=
build_target_phid
@hbm
.
command
()
@click
.
option
(
'-f'
,
'--filename'
)
@click
.
pass_context
def
send_ctest_results
(
ctx
,
filename
):
_hbm
=
harbomaster
.
Harbormaster
(
ctx
=
ctx
.
obj
)
with
harbomaster
.
CTestResults
(
filename
)
as
tests
:
_hbm
.
send_unit_tests
(
tests
)
@hbm
.
command
()
@click
.
option
(
'-k'
,
'--key'
)
@click
.
option
(
'-u'
,
'--uri'
)
@click
.
option
(
'-l'
,
'--label'
)
@click
.
pass_context
def
send_uri
(
ctx
,
key
,
uri
,
label
):
_hbm
=
harbomaster
.
Harbormaster
(
ctx
=
ctx
.
obj
)
_hbm
.
send_uri
(
key
,
uri
,
label
)
@hbm
.
command
()
@click
.
pass_context
def
passed
(
ctx
):
_hbm
=
harbomaster
.
Harbormaster
(
ctx
=
ctx
.
obj
)
_hbm
.
passed
()
@hbm
.
command
()
@click
.
pass_context
def
failed
(
ctx
):
_hbm
=
harbomaster
.
Harbormaster
(
ctx
=
ctx
.
obj
)
_hbm
.
failed
()
if
__name__
==
'__main__'
:
hbm
(
obj
=
{})
Event Timeline
Log In to Comment