Пример #1
0
    def schedule_graph(self, repo_name, revision, builders_graph, *args, **kwargs):
        """ It schedules a task graph for buildbot jobs through TaskCluster.

        Given a graph of Buildbot builders a TaskCluster graph will be generated
        which the Buildbot bridge will use to schedule Buildbot jobs.

        NOTE: All builders in the graph must contain the same repo_name.
        NOTE: The revision must be a valid one for the implied repo_name from
              the buildernames.

        :param repo_name: e.g. alder, mozilla-central
        :type repo_name: str
        :param revision: 12-chars representing a push
        :type revision: str
        :param builders_graph: It is a graph made up of a dictionary where each
                               key is a Buildbot buildername. The values to each
                               key are lists of builders (or empty list for build
                               jobs without test jobs).
        :type builders_graph: dict
        :returns: None or a valid taskcluster task graph.
        :rtype: dict

        """
        task_graph = buildbot_bridge.generate_builders_tc_graph(
            repo_name=repo_name, revision=revision, builders_graph=builders_graph, metadata=kwargs.get("metadata")
        )
        return super(TaskClusterBuildbotManager, self).schedule_graph(task_graph=task_graph, *args, **kwargs)
Пример #2
0
    def schedule_graph(self, repo_name, revision, builders_graph, *args,
                       **kwargs):
        """ It schedules a task graph for buildbot jobs through TaskCluster.

        Given a graph of Buildbot builders a TaskCluster graph will be generated
        which the Buildbot bridge will use to schedule Buildbot jobs.

        NOTE: All builders in the graph must contain the same repo_name.
        NOTE: The revision must be a valid one for the implied repo_name from
              the buildernames.

        :param repo_name: e.g. alder, mozilla-central
        :type repo_name: str
        :param revision: 12-chars representing a push
        :type revision: str
        :param builders_graph: It is a graph made up of a dictionary where each
                               key is a Buildbot buildername. The values to each
                               key are lists of builders (or empty list for build
                               jobs without test jobs).
        :type builders_graph: dict
        :returns: None or a valid taskcluster task graph.
        :rtype: dict

        """
        task_graph = buildbot_bridge.generate_builders_tc_graph(
            repo_name=repo_name,
            revision=revision,
            builders_graph=builders_graph,
        )
        return super(TaskClusterBuildbotManager,
                     self).schedule_graph(task_graph=task_graph,
                                          *args,
                                          **kwargs)
 def test_task_name_metadata_is_buildername(self):
     self.graph = buildbot_bridge.generate_builders_tc_graph(
         self.repo_name,
         self.revision,
         self.builders_graph
     )
     flag = False
     for task in self.graph['tasks']:
         if task['task']['metadata']['name'] == self.buildernames[0]:
             flag = True
     self.assertEquals(flag, True)