Example #1
0
def setBuildIDProps(step, build):
    """Sets buildid and builduid properties.

    On a rebuild we willl re-generate the builduid.  Otherwise, we normally get
    them from the scheduler.

    If either of buildid or builduid doesn't exist, it will be created."""

    if build.reason.startswith("The web-page 'rebuild'"):
        # Override builduid since this is a manually triggered
        # rebuild
        build.setProperty("builduid", genBuildUID(), "setBuildProps")

    # Make sure we have required properties
    props = build.getProperties()
    if not props.has_key("buildid"):
        build.setProperty("buildid", genBuildID(), "setBuildProps")
    if not props.has_key("builduid"):
        build.setProperty("builduid", genBuildUID(), "setBuildProps")

    return SUCCESS
def setBuildIDProps(step, build):
    """Sets buildid and builduid properties.

    On a rebuild we willl re-generate the builduid.  Otherwise, we normally get
    them from the scheduler.

    If either of buildid or builduid doesn't exist, it will be created."""

    if build.reason.startswith("The web-page 'rebuild'"):
        # Override builduid since this is a manually triggered
        # rebuild
        build.setProperty("builduid", genBuildUID(), "setBuildProps")

    # Make sure we have required properties
    props = build.getProperties()
    if "buildid" not in props:
        build.setProperty("buildid", genBuildID(), "setBuildProps")
    if "builduid" not in props:
        build.setProperty("builduid", genBuildUID(), "setBuildProps")

    return SUCCESS
Example #3
0
def buildUIDSchedFunc(sched, t, ssid):
    """Return a Properties instance with 'builduid' set to a randomly generated
    id."""
    props = Properties()
    props.setProperty("builduid", genBuildUID(), "buildUIDSchedFunc")
    return props
Example #4
0
def buildUIDSchedFunc(sched, t, ssid):
    """Return a Properties instance with 'builduid' set to a randomly generated
    id."""
    props = Properties()
    props.setProperty('builduid', genBuildUID(), 'buildUIDSchedFunc')
    return props