Exemple #1
0
def copr_build(srpm_url, release, dist, package, version,
               update_file=None, copr_owner='jruzicka', skip_build=False):
    if skip_build:
        log.info("\nSkipping copr build due to -s/--skip-build")
    else:
        copr = _copr.RdoCoprs()
        copr_name = _copr.rdo_copr_name(release, dist)
        repo_url = copr.get_repo_url(release, dist)
        web_url = copr.get_builds_url(release, dist)
        log.info("\n{t.bold}copr:{t.normal} {owner} / {copr}\n"
                 "{t.bold}SRPM:{t.normal} {srpm}\n"
                 "{t.bold}repo:{t.normal} {repo}\n"
                 "{t.bold}web: {t.normal} {web}".format(
                 owner=copr_owner,
                 copr=copr_name,
                 srpm=srpm_url,
                 repo=repo_url,
                 web=web_url,
                 t=log.term))
        copr.new_build(srpm_url, release, dist, watch=True)
    build = rdoupdate.core.Build(id=_copr.copr_fetcher_id(srpm_url),
                                 repo=release,
                                 dist=dist,
                                 source='copr-jruzicka')
    _show_update_entry(build)
    if update_file:
        _update.dump_build(build, update_file)
Exemple #2
0
def koji_build(update_file=None, skip_build=False):
    if skip_build:
        log.info("\nSkipping koji build due to -s/--skip-build")
        fcmd = kojibuild.get_fedpkg_commands()
        build_id = fcmd.nvr
    else:
        if git.branch_needs_push():
            helpers.confirm("It seems local distgit branch needs push. Push "
                            "now?")
        git('push')
        build_id = kojibuild.new_build()
    build = kojibuild.guess_build(build_id)
    _show_update_entry(build)
    if update_file:
        _update.dump_build(build, update_file)
Exemple #3
0
def koji_build(update_file=None, skip_build=False):
    if skip_build:
        log.info("\nSkipping koji build due to -s/--skip-build")
        fcmd = kojibuild.get_fedpkg_commands()
        build_id = fcmd.nvr
    else:
        if git.branch_needs_push():
            helpers.confirm("It seems local distgit branch needs push. Push " "now?")
        git("push")
        build_id = kojibuild.new_build()
    build = kojibuild.guess_build(build_id)
    if not build:
        raise exception.CantGuess(what="build arguments", why="Unknown branch? Check `rdopkg pkgenv` and `rdopkg info`")
    _show_update_entry(build)
    if update_file:
        _update.dump_build(build, update_file)