Esempio n. 1
0
        if "dependencies" in repodata[reponame]:
            if repository in repodata[reponame]["dependencies"]:
                repoconf = repodata[reponame]
                if "Type" in repoconf:
                    repotype = repoconf["Type"]
                    if repotype != "none":
                        if "default_branch" in repoconf:
                            repobranch = repoconf["default_branch"]
                        else:
                            repobranch = "master"
                        bot.Log(
                            "Debug",
                            "Spawning dependency build of %s / %s for primary build of %s / %s"
                            % (reponame, repobranch, repository, branch))
                        bot.SpawnJob(
                            "gopherci",
                            [reponame, repobranch, repository, branch])

if len(sys.argv) == 2:
    # Four args, inital build of dependency
    # build repo + deps
    build_triggered = True
    deprepo = sys.argv.pop(0)
    depbranch = sys.argv.pop(0)
    if repository in repodata:
        repoconf = repodata[repository]
        if "Type" in repoconf:
            repotype = repoconf["Type"]
            if repotype != "none":
                build_triggered = True
                bot.Log(
Esempio n. 2
0
    for reponame in repodata.keys():
        if repodata[reponame]["Dependencies"] != None:
            if repository in repodata[reponame]["Dependencies"]:
                repoconf = repodata[reponame]
                repotype = repoconf["Type"]
                if len(repotype) != 0 and repotype != "none":
                    if "default_branch" in repoconf:
                        repobranch = repoconf["default_branch"]
                    else:
                        repobranch = "master"
                    bot.Log(
                        "Debug",
                        "Spawning dependency build of %s / %s for primary build of %s / %s"
                        % (reponame, repobranch, repository, branch))
                    bot.SpawnJob(
                        "gopherci",
                        ["depbuild", reponame, repobranch, repository, branch])

if command == "depbuild":
    # Inital build of dependency
    # build repo + deps
    build_triggered = True
    deprepo = sys.argv.pop(0)
    depbranch = sys.argv.pop(0)
    if repository in repodata:
        repoconf = repodata[repository]
        repotype = repoconf["Type"]
        if len(repotype) != 0 and repotype != "none":
            build_triggered = True
            bot.Log(
                "Debug",