Ticket #305: stepinstances.diff

File stepinstances.diff, 4.2 kB (added by albertHofkamp, 5 months ago)

replacement of use of classes with use of objects in addStep() examples

  • buildbot.texinfo

    old new  
    43804380language setting, you might use 
    43814381 
    43824382@example 
    4383 f.addStep(ShellCommand, command=["make", "test"], 
    4384           env=@{'LANG': 'fr_FR'@}
     4383f.addStep(ShellCommand(command=["make", "test"], 
     4384                       env=@{'LANG': 'fr_FR'@})
    43854385@end example 
    43864386 
    43874387These variable settings will override any existing ones in the 
     
    43944394following: 
    43954395 
    43964396@example 
    4397 f.addStep(ShellCommand, command=["make", "test"], 
    4398           env=@{'PYTHONPATH': ["/usr/local/lib/python2.3", 
    4399                               "/home/buildbot/lib/python"] @}) 
     4397f.addStep(ShellCommand( 
     4398              command=["make", "test"], 
     4399              env=@{'PYTHONPATH': ["/usr/local/lib/python2.3", 
     4400                                   "/home/buildbot/lib/python"] @})) 
    44004401@end example 
    44014402 
    44024403@item want_stdout 
     
    44264427the build runs, and any new text will be sent over to the buildmaster. 
    44274428 
    44284429@example 
    4429 f.addStep(ShellCommand, command=["make", "test"], 
    4430           logfiles=@{"triallog": "_trial_temp/test.log"@}) 
     4430f.addStep(ShellCommand( 
     4431              command=["make", "test"], 
     4432              logfiles=@{"triallog": "_trial_temp/test.log"@})) 
    44314433@end example 
    44324434 
    44334435 
     
    44554457display. 
    44564458 
    44574459@example 
    4458 f.addStep(ShellCommand, command=["make", "test"], 
    4459           description=["testing"], 
    4460           descriptionDone=["tests"]
     4460f.addStep(ShellCommand(command=["make", "test"], 
     4461                       description=["testing"], 
     4462                       descriptionDone=["tests"])
    44614463@end example 
    44624464 
    44634465@end table 
     
    45924594@example 
    45934595from buildbot.steps.shell import ShellCommand, WithProperties 
    45944596 
    4595 f.addStep(ShellCommand, 
     4597f.addStep(ShellCommand( 
    45964598          command=["tar", "czf", 
    45974599                   WithProperties("build-%s.tar.gz", "revision"), 
    4598                    "source"]) 
     4600                   "source"])) 
    45994601@end example 
    46004602 
    46014603If this BuildStep were used in a tree obtained from Subversion, it 
     
    46144616arguments: 
    46154617 
    46164618@example 
    4617 f.addStep(ShellCommand, 
     4619f.addStep(ShellCommand( 
    46184620          command=["tar", "czf", 
    46194621                   WithProperties("build-%(revision)s.tar.gz"), 
    4620                    "source"]) 
     4622                   "source"])) 
    46214623@end example 
    46224624 
    46234625Don't forget the extra ``s'' after the closing parenthesis! This is 
     
    47434745from buildbot.steps.python import BuildEPYDoc 
    47444746 
    47454747... 
    4746 f.addStep(BuildEPYDoc, command=["epydoc", "-o", "apiref", "source/mypkg"]
     4748f.addStep(BuildEPYDoc(command=["epydoc", "-o", "apiref", "source/mypkg"])
    47474749@end example 
    47484750 
    47494751 
     
    47704772from buildbot.steps.python import PyFlakes 
    47714773 
    47724774... 
    4773 f.addStep(PyFlakes, command=["pyflakes", "src"]
     4775f.addStep(PyFlakes(command=["pyflakes", "src"])
    47744776@end example 
    47754777 
    47764778 
     
    48024804from buildbot.steps.shell import ShellCommand 
    48034805from buildbot.steps.transfer import FileUpload 
    48044806 
    4805 f.addStep(ShellCommand, command=["make", "docs"]) 
    4806 f.addStep(FileUpload, 
    4807           slavesrc="docs/reference.html", 
    4808           masterdest="~/public_html/ref.html") 
     4807f.addStep(ShellCommand(command=["make", "docs"])) 
     4808f.addStep(FileUpload(slavesrc="docs/reference.html", 
     4809                     masterdest="~/public_html/ref.html")) 
    48094810@end example 
    48104811 
    48114812The @code{masterdest=} argument will be passed to os.path.expanduser, 
     
    48254826from buildbot.steps.shell import ShellCommand 
    48264827from buildbot.steps.transfer import FileUpload 
    48274828 
    4828 f.addStep(FileDownload 
    4829           mastersrc="~/todays_build_config.txt", 
    4830           slavedest="build_config.txt") 
    4831 f.addStep(ShellCommand, command=["make", "config"]) 
     4829f.addStep(FileDownload(mastersrc="~/todays_build_config.txt", 
     4830                       slavedest="build_config.txt")) 
     4831f.addStep(ShellCommand(command=["make", "config"])) 
    48324832@end example 
    48334833 
    48344834Like @code{FileUpload}, the @code{mastersrc=} argument is interpreted 
     
    48714871 
    48724872@example 
    48734873from buildbot.steps.trigger import Trigger 
    4874 f.addStep(Trigger, schedulerNames=['build-prep'], 
    4875                    waitForFinish=True, 
    4876                    updateSourceStamp=True
     4874f.addStep(Trigger(schedulerNames=['build-prep'], 
     4875                  waitForFinish=True, 
     4876                  updateSourceStamp=True)
    48774877@end example 
    48784878 
    48794879The @code{schedulerNames=} argument lists the Triggerables