Skip to content
Permalink
Browse files
[build.webkit.org] Remove code specific to old Buildbot
https://bugs.webkit.org/show_bug.cgi?id=221558

Reviewed by Jonathan Bedard.

* CISupport/build-webkit-org/buildbot.tac:
* CISupport/build-webkit-org/loadConfig.py:
* CISupport/build-webkit-org/loadConfig_unittest.py:
* CISupport/build-webkit-org/master.cfg: Removed.
* CISupport/build-webkit-org/steps.py:
(TestWithFailureCount.getText): Deleted.
(TestWithFailureCount.getText2): Deleted.
(CompileWebKit.createSummary): Deleted.
(RunWebKitTests._parseRunWebKitTestsOutput): Deleted.
(RunWebKitTests.commandComplete): Deleted.
(RunWebKitTests.getText): Deleted.
(RunWebKitTests.getText2): Deleted.
(ExtractTestResults.start): Deleted.
* CISupport/ews-build/steps.py:
* CISupport/ews-build/steps_unittest.py:


Canonical link: https://commits.webkit.org/233932@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272681 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
aj062 committed Feb 10, 2021
1 parent ec03b66 commit 8d41b0b3183122c55e65ba456d4c2c84ab26b253
Showing 8 changed files with 86 additions and 348 deletions.
@@ -1,15 +1,10 @@
import os

USE_BUILDBOT_VERSION2 = os.getenv('USE_BUILDBOT_VERSION2') is not None

from twisted.application import service
from buildbot.master import BuildMaster

basedir = '.'
if USE_BUILDBOT_VERSION2:
configfile = r'master_buildbot2.cfg'
else:
configfile = r'master.cfg'
configfile = r'master_buildbot2.cfg'
rotateLength = 50000000
maxRotatedFiles = 20
umask = 0o022
@@ -21,12 +21,8 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

import os
USE_BUILDBOT_VERSION2 = os.getenv('USE_BUILDBOT_VERSION2') is not None

if USE_BUILDBOT_VERSION2:
from buildbot.worker import Worker
else:
from buildbot.buildslave import BuildSlave
from buildbot.worker import Worker
from buildbot.scheduler import AnyBranchScheduler, Triggerable, Nightly
from buildbot.schedulers.forcesched import FixedParameter, ForceScheduler, StringParameter, BooleanParameter
from buildbot.schedulers.filter import ChangeFilter
@@ -62,10 +58,7 @@ def loadBuilderConfig(c, is_test_mode_enabled=False):
os.environ['RESULTS_SERVER_API_KEY'] = results_server_api_key

config = json.load(open('config.json'))
if USE_BUILDBOT_VERSION2:
c['workers'] = [Worker(worker['name'], passwords.get(worker['name'], 'password'), max_builds=1) for worker in config['workers']]
else:
c['slaves'] = [BuildSlave(worker['name'], passwords.get(worker['name'], 'password'), max_builds=1) for worker in config['workers']]
c['workers'] = [Worker(worker['name'], passwords.get(worker['name'], 'password'), max_builds=1) for worker in config['workers']]

c['schedulers'] = []
for scheduler in config['schedulers']:
@@ -79,23 +72,7 @@ def loadBuilderConfig(c, is_test_mode_enabled=False):
builderNames = [str(builder['name']) for builder in config['builders']]
reason = StringParameter(name='reason', default='', size=40)
properties = [BooleanParameter(name='is_clean', label='Force Clean build')]
if USE_BUILDBOT_VERSION2:
forceScheduler = ForceScheduler(name='force', builderNames=builderNames, reason=reason, properties=properties)
else:
forceScheduler = ForceScheduler(
name='force',
builderNames=builderNames,
reason=reason,

# Validate SVN revision: number or empty string
revision=StringParameter(name="revision", default="", regex=re.compile(r'^(\d*)$')),

# Disable default enabled input fields: branch, repository, project, additional properties
branch=FixedParameter(name="branch"),
repository=FixedParameter(name="repository"),
project=FixedParameter(name="project"),
properties=properties
)
forceScheduler = ForceScheduler(name='force', builderNames=builderNames, reason=reason, properties=properties)
c['schedulers'].append(forceScheduler)

c['builders'] = []
@@ -109,8 +86,6 @@ def loadBuilderConfig(c, is_test_mode_enabled=False):
raise Exception('Builder {} is for platform {} but has worker {} for platform {}!'.format(builder['name'], builder['platform'], worker['name'], worker['platform']))
break

if not USE_BUILDBOT_VERSION2:
builder['slavenames'] = builder.pop('workernames')
platform = builder['platform']

factoryName = builder.pop('factory')
@@ -129,10 +104,7 @@ def loadBuilderConfig(c, is_test_mode_enabled=False):
if not buildbot_identifiers_re.match(builder_name):
raise Exception('Builder name "{}" is not a valid buildbot identifier.'.format(builder_name))
for step in builder["factory"].steps:
if USE_BUILDBOT_VERSION2:
step_name = step.buildStep().name
else:
step_name = step[0].name
step_name = step.buildStep().name
if len(step_name) > STEP_NAME_LENGTH_LIMIT:
raise Exception('step name "{}" is longer than maximum allowed by Buildbot ({} characters).'.format(step_name, STEP_NAME_LENGTH_LIMIT))
if not buildbot_identifiers_re.match(step_name):
@@ -158,10 +130,7 @@ def loadBuilderConfig(c, is_test_mode_enabled=False):
if (category in ('AppleMac', 'AppleWin', 'iOS')) and factoryName != 'BuildFactory':
builder['nextBuild'] = pickLatestBuild

if USE_BUILDBOT_VERSION2:
builder['tags'] = getTagsForBuilder(builder)
else:
builder['category'] = category
builder['tags'] = getTagsForBuilder(builder)
c['builders'].append(builder)


@@ -27,9 +27,7 @@
import os
import unittest

USE_BUILDBOT_VERSION2 = os.getenv('USE_BUILDBOT_VERSION2') is not None
if USE_BUILDBOT_VERSION2:
import loadConfig
import loadConfig

class ConfigDotJSONTest(unittest.TestCase):
def get_config(self):

This file was deleted.

0 comments on commit 8d41b0b

Please sign in to comment.