Exemple #1
0
def render_add_build_tito(copr, form, view, package=None):
    if not form:
        form = forms.BuildFormTitoFactory(copr.active_chroots)()
    return flask.render_template("coprs/detail/add_build/tito.html",
                                 copr=copr,
                                 form=form,
                                 view=view,
                                 package=package)
Exemple #2
0
def process_new_build_tito(copr, add_view, url_on_success):
    def factory(**build_options):
        BuildsLogic.create_new_from_tito(flask.g.user, copr, form.git_url.data,
                                         form.git_directory.data,
                                         form.git_branch.data,
                                         form.tito_test.data,
                                         form.selected_chroots,
                                         **build_options)

    form = forms.BuildFormTitoFactory(copr.active_chroots)()
    return process_new_build(copr, form, factory, render_add_build_tito,
                             add_view, url_on_success)
Exemple #3
0
def copr_new_build_tito(copr):
    form = forms.BuildFormTitoFactory(copr.active_chroots)(csrf_enabled=False)

    def create_new_build():
        return BuildsLogic.create_new_from_tito(
            flask.g.user,
            copr,
            form.git_url.data,
            form.git_directory.data,
            form.git_branch.data,
            form.tito_test.data,
            form.selected_chroots,
        )

    return process_creating_new_build(copr, form, create_new_build)
Exemple #4
0
def copr_new_build_tito(copr):
    """
    @deprecated
    """
    form = forms.BuildFormTitoFactory(copr.active_chroots)(meta={
        'csrf': False
    })

    def create_new_build():
        return BuildsLogic.create_new_from_scm(
            flask.g.user,
            copr,
            scm_type='git',
            clone_url=form.git_url.data,
            subdirectory=form.git_directory.data,
            committish=form.git_branch.data,
            srpm_build_method=('tito_test' if form.tito_test.data else 'tito'),
            chroot_names=form.selected_chroots,
            background=form.background.data,
        )

    return process_creating_new_build(copr, form, create_new_build)