[Buildbot-commits] [Buildbot] #2562: Interpolate got_revision property doesn't work when using multiple codebases

Buildbot trac trac at buildbot.net
Tue Oct 22 15:47:44 UTC 2013


#2562: Interpolate got_revision property doesn't work when using multiple
codebases
-------------------+--------------------
Reporter:  yasser  |       Owner:
    Type:  defect  |      Status:  new
Priority:  major   |   Milestone:  0.8.+
 Version:  0.8.8   |  Resolution:
Keywords:          |
-------------------+--------------------

Comment (by rutsky):

 I managed to work with `got_revision` at runtime by writing custom
 renderer:

 {{{
 #!python
     @properties.renderer
     def render_output_dir(props):
         ss_tw = props.getBuild().getSourceStamp('TW').asDict()
         ss_content = props.getBuild().getSourceStamp('Content').asDict()

         tw_part = "TW_{branch}_r{rev}".format(
             branch=ss_tw['branch'],
             rev=props.getProperty('got_revision')['TW'])

         content_part = "Content_{branch}_r{rev}".format(
             branch=ss_content['branch'],
             rev=props.getProperty('got_revision')['content'])

         return tw_part + "_" + content_part
 }}}

 And use render_output_dir instead Interpolate in builder configuration:

 {{{
 #!python
     f.addStep(FileUpload(
         slavesrc=build_out_dir + "/" + name,
         masterdest=render_output_dir,
         ))
 }}}

-- 
Ticket URL: <http://trac.buildbot.net/ticket/2562#comment:6>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list