Example #1
0
def schedule(c):
    force_sched = s_force(
        name="force-build-" + PROJECT_NAME,
        cb=FORCE_CODEBASE,
        builders=[PROJECT_NAME],
        properties=[
            util.NestedParameter(name="options", label="Build Options", layout="vertical", fields=[
                util.StringParameter(name="force_feature", label="feature-branch to build:",
                                     default="", size=80),
                util.BooleanParameter(name="force_build_clean", label="force a make clean",
                                      default=False),
                util.BooleanParameter(name="force_complete_rebuild",
                                      label="force complete rebuild and fresh git clone",
                                      default=False),
            ])
        ]
    )

    c['schedulers'].extend([
        s_abranch(PROJECT_NAME + '-sched', CODEBASE, [PROJECT_NAME],
                  change_filter=util.ChangeFilter(branch_fn=trigger_branch_match),
                  treeStableTimer=5 * 60),
        force_sched,
        s_trigger('trigger-' + PROJECT_NAME, CODEBASE, [PROJECT_NAME]),
    ])
Example #2
0
def schedule(c):
    force_sched = s_force(
        name="force-build-" + PROJECT_NAME,
        cb=FORCE_CODEBASE,
        builders=[PROJECT_NAME],
        properties=[
            util.NestedParameter(name="options", label="Build Options", layout="vertical", fields=[
                util.BooleanParameter(name="force_build_clean", label="force a make clean",
                                      default=False),
                util.BooleanParameter(name="force_complete_rebuild",
                                      label="force complete rebuild and fresh git clone",
                                      default=False),
            ])
        ]
    )

    c['schedulers'].extend([
        s_abranch(PROJECT_NAME + '-sched', CODEBASE, [PROJECT_NAME],
                  change_filter=filter.ChangeFilter(branch_re=TRIGGER_BRANCHES),
                  treeStableTimer=5 * 60),
        force_sched,
        s_trigger('trigger-' + PROJECT_NAME, CODEBASE, [PROJECT_NAME]),
        # TODO: Fix nightly scheduler (currently not working)
        #s_nightly('nightly-sched-' + PROJECT_NAME, CODEBASE,
        #          [PROJECT_NAME],
        #          hour=22, minute=0)
    ])
Example #3
0
def force_scheduler():
    default_project = "%s/%s" % (util.env.GIT_OWNER, util.env.GIT_SLUG)

    yaml_options = util.NestedParameter(
        name=None,
        label='Eve',
        fields=[
            util.StringParameter(name='force_stage',
                                 label='Override stage (optional)')
        ])

    extra_props = util.NestedParameter(
        name=None,
        label='Extra properties',
        fields=[
            util.AnyPropertyParameter(name='prop%02d' % i)
            for i in range(util.env.FORCE_BUILD_PARAM_COUNT)
        ])

    # Hack to remove ugly ':' from extra properties
    for prop in extra_props.fields:
        prop.fields[0].label = 'Name'
        prop.fields[1].label = 'Value'

    return schedulers.EveForceScheduler(
        name=util.env.FORCE_SCHEDULER_NAME,
        builderNames=[util.env.BOOTSTRAP_BUILDER_NAME],
        reason=util.StringParameter(name='reason',
                                    label='Reason',
                                    default='force build',
                                    size=20),
        properties=[yaml_options] + [extra_props],
        codebases=[
            util.CodebaseParameter(
                '',
                label='Repository',
                branch=util.StringParameter(name='branch',
                                            label='Branch',
                                            required=True),
                revision=util.FixedParameter(name='revision', default=''),
                repository=util.FixedParameter(name='repository',
                                               default=util.env.GIT_REPO),
                project=util.FixedParameter(name='project',
                                            default=default_project),
            )
        ])
Example #4
0
def buildBoxCheckboxContainer():
    """
    Creates a parameter which contains checkboxes
    for each OS presented in the BUILD_ALL_BOXES array
    """
    return util.NestedParameter(
        name="build_box_checkbox_container",
        label="Build boxes",
        maxsize=300,
        columns=1,
        fields=[buildBoxCheckbox(box) for box in constants.BUILD_ALL_BOXES],
        default=dict((box, True) for box in constants.BUILD_ALL_BOXES))
Example #5
0
        util.NestedParameter(
            name="",
            layout="tabs",
            fields=[
                util.NestedParameter(
                    name="",
                    label="Source tree checkout",
                    layout="vertical",
                    fields=[
                        util.BooleanParameter(
                            name="use_local_manifest",
                            label="Use the repo local manifest below",
                            default=False,
                        ),
                        util.TextParameter(
                            name="local_manifest_xml",
                            label=
                            "Local manifest to apply changes to the source tree",
                            default=r"""
<manifest>
  <!--
    This is an example of a local-manifest file: tweak it to your needs.
    You can find examples below that use dummy values and that illustrate the
    operations you may want to do with such a local-manifest file:
  -->

  <!-- How to declare an additional Git remote you can use futher down: -->
  <remote name="foobaros-github" fetch="https://github.com/foobaros" />

  <!-- How to remove from the source tree a useless item: -->
  <remove-project name="src_external_uselessproject" />

  <!-- How to declare and checkout a new item in the source tree: -->
  <project path="products/foobaros" name="products_foobaros" remote="foobaros-github" revision="refs/changes/42/1342/7" />

  <!-- How to change the checkout properties of an existing source tree item: -->
  <remove-project name="src_portage_clipos" />
  <project path="src/portage/clipos" name="src_portage_clipos" revision="refs/changes/37/1337/2" />
</manifest>
                        """.strip(),
                            cols=80,
                            rows=6,
                        ),
                    ],
                ),
                util.NestedParameter(
                    name="",
                    label="Workspace settings",
                    layout="vertical",
                    fields=[
                        util.BooleanParameter(
                            name="cleanup_workspace",
                            label=
                            "Clean up the workspace beforehand (strongly advised)",
                            default=True,
                        ),
                        util.BooleanParameter(
                            name="force_repo_quicksync_artifacts_download",
                            label=
                            "Force the fetch of the source tree quick-sync artifacts",
                            default=False,
                        ),
                    ],
                ),
                util.NestedParameter(
                    name="",
                    label="CLIP OS build process options",
                    layout="vertical",
                    columns=1,
                    fields=[
                        util.BooleanParameter(
                            name="produce_sdks_artifacts",
                            label=
                            "Produce SDKs artifacts and upload them on the buildmaster",
                            default=False,
                        ),
                        util.BooleanParameter(
                            name="reuse_sdks_artifacts",
                            label=
                            "Reuse SDKs artifacts instead of bootstrapping SDKs from scratch",
                            default=True,
                        ),
                        util.ChoiceStringParameter(
                            name="buildername_providing_sdks_artifacts",
                            label=
                            "Builder name from which retrieving SDKs artifact (latest artifacts will be used)",
                            choices=[
                                *[
                                    b.name
                                    for b in clipos_on_all_flavors_builders
                                ],
                            ],
                            default=reference_clipos_builder.name,
                        ),
                        util.BooleanParameter(
                            name="produce_cache_artifacts",
                            label=
                            "Produce cache artifacts (binary packages, etc.) and upload them on the buildmaster",
                            default=False,
                        ),
                        util.BooleanParameter(
                            name="reuse_cache_artifacts",
                            label=
                            "Reuse cache artifacts instead of bootstrapping SDKs from scratch",
                            default=True,
                        ),
                        util.ChoiceStringParameter(
                            name="buildername_providing_cache_artifacts",
                            label=
                            "Builder name from which retrieving cache artifact (latest artifacts will be used)",
                            choices=[
                                *[
                                    b.name
                                    for b in clipos_on_all_flavors_builders
                                ],
                            ],
                            default=reference_clipos_builder.name,
                        ),
                        util.BooleanParameter(
                            name="produce_build_artifacts",
                            label=
                            "Produce build result artifacts and upload them on the buildmaster",
                            default=False,
                        ),
                    ],
                ),
            ],
        )