<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Dear Viraj,</p>
    <p>What do you want to do with your custom step ?</p>
    <p>Shooting in the dark, here are simple custom steps I have in my
      bots, to provide you examples:</p>
    <p><tt>class _ClearPropertyStep(steps.BuildStep):</tt><tt><br>
      </tt><tt>    """</tt><tt><br>
      </tt><tt>        Step that clears a property</tt><tt><br>
      </tt><tt>    """</tt><tt><br>
      </tt><tt><br>
      </tt><tt>    def __init__(self, prop, **kwargs):</tt><tt><br>
      </tt><tt>        steps.BuildStep.__init__(self, **kwargs)</tt><tt><br>
      </tt><tt>        assert prop is not None and len(prop) > 0</tt><tt><br>
      </tt><tt>        self.property = prop</tt><tt><br>
      </tt><tt><br>
      </tt><tt>    @defer.inlineCallbacks</tt><tt><br>
      </tt><tt>    def run(self):</tt><tt><br>
      </tt><tt>        print("Clearing property " + self.property)</tt><tt><br>
      </tt><tt>        self.setProperty(self.property, None,
        str(type(self)))</tt><tt><br>
      </tt><tt>        yield defer.returnValue(SUCCESS)</tt><br>
    </p>
    <p>Here's another one:</p>
    <p><tt>class _URLStep(steps.BuildStep):<br>
            """<br>
                Step whose only purpose is to show a description and an
        URL<br>
            """<br>
        <br>
            renderables = steps.BuildStep.renderables + [<br>
                'url_text',<br>
                'url',<br>
            ]<br>
        <br>
            def __init__(self, url_text, url, **kwargs):<br>
                steps.BuildStep.__init__(self, **kwargs)<br>
                assert url_text is not None<br>
                self.url_text = url_text<br>
                assert url is not None<br>
                self.url = url<br>
        <br>
            @defer.inlineCallbacks<br>
            def run(self):<br>
                print("Setting URL: " + str(self.url))<br>
                self.addURL(self.url_text, self.url)<br>
                yield defer.returnValue(SUCCESS)</tt><br>
    </p>
    <p>Best,</p>
    <p>Clément Hurlin<br>
    </p>
    <blockquote type="cite"
cite="mid:CAEPrOE+uosL-XQ2nzeC6=rYh+Qm4_x_ii_ML0Y479aOrwr65OQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>Hi</div>
        <div><br>
        </div>
        <div>I got stuck in buildbot for configuring custom buildbot
          step. <br>
        </div>
        <div><br>
        </div>
        <div>Can you please help me with one of the example how we can
          create custom build step.</div>
        <div><br>
        </div>
        <div>Regards,</div>
        <div>Viraj Wadate</div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@buildbot.net">users@buildbot.net</a>
<a class="moz-txt-link-freetext" href="https://lists.buildbot.net/mailman/listinfo/users">https://lists.buildbot.net/mailman/listinfo/users</a></pre>
    </blockquote>
  </body>
</html>