tardyp changed the topic of #buildbot to: A Software Freedom Conservancy Project | Buildbot-3.2.0 | docs: http://docs.buildbot.net/current/ | tutorial: http://docs.buildbot.net/current/tutorial | irclogs: https://libera.irclog.whitequark.org/buildbot
ewong has quit [Changing host]
ewong has joined #buildbot
ewong has quit [Quit: checksasl]
flx has quit [Ping timeout: 268 seconds]
ewong has joined #buildbot
flx has joined #buildbot
alicef has quit [Quit: install gentoo]
alicef has joined #buildbot
mojca has joined #buildbot
<mpbridge> <mojca> I'm struggling to figure out the proper syntax to upload files to a different location depending on the branch being built. Here's my naive attempt:
<mpbridge> <mojca> That sadly says `builtins.NameError: name 'step' is not defined`
<cmouse> mpbridge: you need to import step
<cmouse> ohhh
<cmouse> you need to use @builbot.util.renderer on the function
<mojca> cmouse: sorry, it's mojca talking over a bridge (I have some struggles with IRC alone), rather than the bridge talking ;)
<mojca> I tried `@util.renderer`, but the error comes from where I call the function
<mojca> The error is thrown by `masterdest = os.path.join(config['downloadPath'], get_branch_name_on_server(step), fileDest)`
<mojca> Or does the whole factory need the renderer?
<cmouse> mhm.
<mojca> Was that a "yes"? If I add it on the whole factory creation function, I cannot get it to work either https://paste.macports.org/6f0bed4d6cc3
<cmouse> it was "i am not sure"
<cmouse> i think you need to create a custom step, which does that masterdest stuff
<cmouse> now the os.path.join is called too early.
<cmouse> or you can try masterdest = get_master_dest(step) and mark that renderer
<cmouse> then move the os.path.join there
<mojca> I'll try your suggestion now. I just wanted to say that the following works just fine, and I don't quite understand what the big difference is:
<mojca> I tried the following, but no success: https://paste.macports.org/d476053952fc
mojca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mojca has joined #buildbot
<mojca> Just in case it's relevant, this is the full setup: https://github.com/TeXLive-M/texlive-buildbot/blob/master/master.cfg#L282-L289
mojca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<cmouse> maybe try step=>self
mojca has joined #buildbot
<skelly> or step => steps?
<skelly> mojca: oh I see, don't call get_texlive_masterdest, Buildbot will do that when renderering
<skelly> if you need to pass in an argument, you will have to use a nested function that returns the renderer
<skelly> even better, you can use withArgs
<skelly> mojca: see https://docs.buildbot.net/current/manual/configuration/properties.html#renderer and search for the withArgs example, that appears to match what you want to do
mojca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]