2021-12-23 08:01:52 +00:00
|
|
|
from buildbot.plugins import util
|
|
|
|
import re
|
|
|
|
|
2022-04-07 12:46:29 +00:00
|
|
|
def _is_build_script_available(props):
|
|
|
|
return props.getProperty("build_script_available", default=False)
|
2021-12-23 08:01:52 +00:00
|
|
|
|
|
|
|
@util.renderer
|
2021-12-25 06:57:44 +00:00
|
|
|
def is_build_script_available(props):
|
2022-04-07 12:46:29 +00:00
|
|
|
return _is_build_script_available(props)
|
2021-12-23 08:01:52 +00:00
|
|
|
|
|
|
|
@util.renderer
|
2021-12-25 06:57:44 +00:00
|
|
|
def isnt_build_script_available(props):
|
2022-04-07 12:46:29 +00:00
|
|
|
return not _is_build_script_available(props)
|
2021-12-23 08:01:52 +00:00
|
|
|
|
2022-04-07 12:46:29 +00:00
|
|
|
def _is_test_script_available(props):
|
|
|
|
return props.getProperty("test_script_available", default=False)
|
2021-12-23 08:01:52 +00:00
|
|
|
|
|
|
|
@util.renderer
|
2021-12-25 06:57:44 +00:00
|
|
|
def is_test_script_available(props):
|
2022-04-07 12:46:29 +00:00
|
|
|
return _is_test_script_available(props)
|
2021-12-23 08:01:52 +00:00
|
|
|
|
|
|
|
@util.renderer
|
2021-12-25 06:57:44 +00:00
|
|
|
def isnt_test_script_available(props):
|
2022-04-07 12:46:29 +00:00
|
|
|
return not _is_test_script_available(props)
|
2022-08-08 03:21:33 +00:00
|
|
|
|
|
|
|
def _files_to_upload(props):
|
2022-08-08 08:20:14 +00:00
|
|
|
try:
|
|
|
|
return ','.join(props.getProperty("files_to_upload", default="").rstrip().split("\n"))
|
|
|
|
except AttributeError:
|
|
|
|
return ""
|
2022-08-08 03:21:33 +00:00
|
|
|
|
2022-08-08 03:40:59 +00:00
|
|
|
@util.renderer
|
2022-08-08 03:21:33 +00:00
|
|
|
def files_to_upload(props):
|
2022-08-08 08:20:14 +00:00
|
|
|
return _files_to_upload(props)
|
|
|
|
|
|
|
|
@util.renderer
|
|
|
|
def has_files_to_upload(props):
|
|
|
|
return bool(_files_to_upload(props))
|
2022-08-08 03:21:33 +00:00
|
|
|
|
2022-08-08 03:40:59 +00:00
|
|
|
@util.renderer
|
2022-08-08 03:21:33 +00:00
|
|
|
def no_files_to_upload(props):
|
|
|
|
return not _files_to_upload(props)
|