Package hudson.plugins.git.util

Examples of hudson.plugins.git.util.Build


                createInternalTag(git, internalTagName, internalTagComment);

                String changeLog = computeChangeLog(git, revToBuild, listener, buildData);

                buildData.saveBuild(new Build(revToBuild, buildNumber, null));

                // Fetch the diffs into the changelog file
                return new BuildConfig(changeLog, buildData);
            }
        });
View Full Code Here


                    // branch.
                    git.checkoutBranch(paramLocalBranch, revToBuild.getSha1().name());

                    createInternalTag(git, internalTagName, internalTagComment);

                    buildData.saveBuild(new Build(revToBuild, buildNumber, Result.FAILURE));
                    return new BuildConfig(null, buildData);
                }

                if (git.hasGitModules()) {
                    // This ensures we don't miss changes to submodule paths and allows
                    // seamless use of bare and non-bare superproject repositories.
                    git.setupSubmoduleUrls(revToBuild, listener);
                    git.submoduleUpdate(recursiveSubmodules);
                }

                createInternalTag(git, internalTagName, internalTagComment);

                String changeLog = computeChangeLog(git, revToBuild, listener, buildData);

                Build build = new Build(revToBuild, buildNumber, null);
                buildData.saveBuild(build);
                GitUtils gu = new GitUtils(listener, git);
                build.mergeRevision = gu.getRevisionForSHA1(target);
                if (getClean()) {
                    listener.getLogger().println("Cleaning workspace");
View Full Code Here

        int histories = 0;

        StringBuilder changeLog = new StringBuilder();
        try {
            for (Branch b : revToBuild.getBranches()) {
                Build lastRevWas = buildChooser.prevBuildForChangelog(b.getName(), buildData, git);
                if (lastRevWas != null) {
                    if (git.isCommitInRepo(lastRevWas.getSHA1().name())) {
                        changeLog.append(putChangelogDiffsIntoFile(git, b.name, lastRevWas.getSHA1().name(),
                            revToBuild.getSha1().name()));
                        histories++;
                    } else {
                        listener.getLogger()
                            .println("Could not record history. Previous build's commit, " + lastRevWas.getSHA1().name()
                                + ", does not exist in the current repository.");
                    }
                } else {
                    listener.getLogger().println("No change to record in branch " + b.getName());
                }
View Full Code Here

            parentRev.getBranches().add(new Branch(singleBranch, parentSha1));

            int prevBuildNum = 0;
            Result r = null;

            Build lastBuild = data.getLastBuildOfBranch(singleBranch);
            if (lastBuild != null) {
                prevBuildNum = lastBuild.getBuildNumber();
                r = lastBuild.getBuildResult();
            }

            return new Build(parentRev, prevBuildNum, r);
        } else {
            //Hmm no sure what to do here, but the git plugin can handle us returning null here
            return null;
        }
    }
View Full Code Here

TOP

Related Classes of hudson.plugins.git.util.Build

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.