> On Mar 10, 2017, at 10:44 AM, Bob Drummond <[email protected]> wrote:
>
> Have you tried adding properties to the schedulers?
>
> In the source update steps, use mode=util.Property("source_mode")
>
> In the force scheduler add this:
> properties=[util.ChoiceStringParameter(
> name="source_mode",
> choices=["full", "incremental"],
> default="incremental")]
>
> In your current change based scheduler, remember to add
> properties={"source_mode": "incremental"}or those builds will fail.
That worked great, thanks! In case it's useful to anyone else, here's what I
did in addition to the above:
-- current
macFactory.addStep( steps.Git( repourl=repoURL, branch="master",
mode="incremental", alwaysUseLatest=False ) )
-- new
macFactory.addStep( steps.Git( repourl=repoURL, branch="master",
mode=Property('source_mode'), alwaysUseLatest=False ) )
And then add the property to each scheduler with something like:
-- current
schedulers.append( SingleBranchScheduler( name="master", branch="master", ... )
-- new
schedulers.append( SingleBranchScheduler( name="master", branch="master",
properties={'source_mode': 'incremental'}, ... )
stephen
>
> I haven't used properties to change the source update mode, but I've used
> this approach for other things.
>
> On Thu, Mar 9, 2017 at 12:34 PM, Stephen Davis <[email protected]
> <mailto:[email protected]>> wrote:
> For speed of commit -> failure turnaround, my builds are configured to use
> mode="incremental".
>
> However, on occasion, some weird build artifact creeps in and the build gets
> stuck in a bad state. I'd like to configure the Force scheduler to override
> the "mode" property of the source step so I can force a clean build but I
> can't figure out how to do it from the docs at
> https://docs.buildbot.net/0.8.14/developer/cls-forcesched.html?highlight=force
>
> <https://docs.buildbot.net/0.8.14/developer/cls-forcesched.html?highlight=force>.
>
> The current force scheduler config looks like:
>
> schedulers.append( ForceScheduler( name = "force",
>
> #
> list of builder names which can be forced
>
> builderNames = names,
>
> #
> user specifies the reason
>
> reason = StringParameter( name="reason", label="reason:<br>", required=True,
> size=80 ),
>
> #
> will generate nothing in the form, but revision, repository,
> # and
> project are needed by buildbot scheduling system so we
> #
> need to pass a value ("")
>
> branch = FixedParameter( name="branch", default="" ),
>
> revision = FixedParameter( name="revision", default="" ),
>
> repository = FixedParameter( name="repository", default="" ),
>
> project = FixedParameter( name="project", default="" ),
> ) )
>
> What I'd like is to force the source update steps to use "full" or "clobber"
> mode but that doesn't seem possible. Is there some other option that can be
> set to force a fresh build on the buildslave?
>
> thanks,
> stephen
> _______________________________________________
> users mailing list
> [email protected] <mailto:[email protected]>
> https://lists.buildbot.net/mailman/listinfo/users
> <https://lists.buildbot.net/mailman/listinfo/users>
>
>
>
> --
> Bob Drummond
> Software Engineer
>
> Netronome | 3159 Unionville Road, Suite 100 Cranberry Twp., PA 16066
> Phone: +1 (724) 778-3295 <tel:+1+(724)+778-3295> | www.netronome.com
> <http://www.netronome.com/>
> <Signature-Option.png>
_______________________________________________
users mailing list
[email protected]
https://lists.buildbot.net/mailman/listinfo/users