[Buildbot-devel] Is it possible to update the sourcestamp?

Dustin J. Mitchell dustin at v.igoro.us
Sat Jun 13 23:27:33 UTC 2015


You could always set the `got_revision` property directly (SetProperty or
SetPropertyFromCommand).

Dustin

On Thu, Jun 11, 2015 at 8:48 AM, Francesco Di Mizio <
francescodimizio at gmail.com> wrote:

> Thanks Vitali.
>
> I gave a try to the sourceStamps param that can be used in a trigger step.
>
> My first attempt looked like
>
> sourceStamps = {
>                                         'branch' :
> util.Interpolate('%(prop:branch)s'),
>                                         'revision' :
> util.Interpolate('%(prop:revision)s')
>                                     },
>
> This should work according to the docs as I only have one SourceStamp to
> specify. Instead it fails in prepare prepareSourcestampListForTrigger .
> Apparently it must be a list of dicts in any case. I therefore tried:
>
> sourceStamps = [{
>                                         'branch' :
> util.Interpolate('%(prop:branch)s'),
>                                         'revision' :
> util.Interpolate('%(prop:revision)s')
>                                     },],
>
> This attemp went a bit further but anyway fails with:
>
> /home/cigservice/buildbot/master/buildbot/steps/trigger.py:217 in run
> 216
> 217            self.brids.extend(brids.values())
> 218            for brid in brids.values():
>
> On Wed, Jun 10, 2015 at 6:53 PM, Vitali Lovich <vlovich at gmail.com> wrote:
>
>> Are you setting updateSourceStamp=True in your Trigger?
>>
>> Instead of manually propagating the revision, would using alwaysUseLatest
>> in your SCM/trigger step work?
>> There’s also a sourceStamps attribute in the Trigger step for setting
>> custom source stamps I think.
>>
>>
>> -Vitali
>>
>> > On Jun 10, 2015, at 4:37 PM, Francesco Di Mizio <
>> francescodimizio at gmail.com> wrote:
>> >
>> > The source stamp is being set by a force scheduler (S) which is
>> exposing branch and revision.
>> > The builder (let's call this K as Kicker) associated with  S kicks off
>> an other scheduler with a trigger step (say T).
>> >
>> > When I type in a number for the revision in S, the revision gets
>> propagated ok all the way down to the triggered scheduler.
>> >
>> > When I leave it blank, the revision is empty therefore it'll be empty
>> for any kicked off build. I can not pass through got_revision because
>> builder K does not even have a source step, therefore got_revision never
>> gets set.
>> >
>> > So my idea was: well I can just add an other step at the very top of
>> builder K that figures out latest revision and then passes it along to any
>> kicked build. That works in the sense that in the K's UI i can see it being
>> set but does not get propagated even though I am telling it to in the
>> trigger step T.
>> >
>> > I guess the reason is that what I am doing does not actually change the
>> sourcestamp, just a property whose name happens to go by the same name.
>> >
>> > Is it possible to extend say ShellCommand and retrieve and change the
>> SStamp in there?
>> > Any suggestions?
>> >
>> > Cheers!
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> ------------------------------------------------------------------------------
>> > _______________________________________________
>> > Buildbot-devel mailing list
>> > Buildbot-devel at lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/buildbot-devel
>>
>>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Buildbot-devel mailing list
> Buildbot-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20150613/f0ec3b7a/attachment.html>


More information about the devel mailing list