buildbot_multibuild/lib/renderers.py
Shashi f38fd1c826
Some checks failed
buildbot/travis_bionic Build done.
Updated-S
2021-12-23 16:56:44 +05:30

38 lines
883 B
Python

from buildbot.plugins import util
import re
def _is_github(props):
if re.search(r'[/@]github.com', props.getProperty('repository')):
return True
return False
@util.renderer
def is_github(props):
return _is_github(props)
@util.renderer
def isnt_github(props):
return not _is_github(props)
def _is_gitea(props):
if re.search(r'[/@]git.bitmessage.org', props.getProperty('repository'), re.I):
return True
return False
@util.renderer
def is_gitea(props):
return _is_gitea(props)
@util.renderer
def isnt_gitea(props):
return not _is_gitea(props)
@util.renderer
def is_build_script_available(props):
# Actual check will got here
return props.getProperty('jobname', default='') != ''
@util.renderer
def is_test_script_available(props):
# Actual check will got here
return props.getProperty('jobname', default='') != ''