Class BuildData

    • Field Detail

      • buildsByBranchName

        public Map<String,​Build> buildsByBranchName
        Map of branch name -> build (Branch name to last built SHA1).

        This map contains all the branches we've built in the past (including the build that this BuildData is attached to)

      • scmName

        public String scmName
        The name of the SCM as given by the user.
      • remoteUrls

        public Set<String> remoteUrls
        The URLs that have been referenced.
    • Method Detail

      • getDisplayName

        public String getDisplayName()
        Returns the build data display name, optionally with SCM name. This string needs to be relatively short because it is displayed in a column with other short links. If it is lengthened, it causes the other data on the page to shift right. The page is then difficult to read.
        Specified by:
        getDisplayName in interface Action
        Specified by:
        getDisplayName in interface ModelObject
        build data display name
      • setIndex

        public void setIndex​(Integer index)
        Sets an identifier used to disambiguate multiple BuildData actions attached to a Run
        index - the index, indexes less than or equal to 1 will be discarded.
      • getIndex

        public Integer getIndex()
        Gets the identifier used to disambiguate multiple BuildData actions attached to a Run.
        the index.
      • getOwningRun

        public Run<?,​?> getOwningRun()
      • readResolve

        public Object readResolve()
      • hasBeenBuilt

        public boolean hasBeenBuilt​(org.eclipse.jgit.lib.ObjectId sha1)
        Return true if the history shows this SHA1 has been built. False otherwise.
        sha1 - SHA1 hash of commit
        true if sha1 has been built
      • getLastBuild

        public Build getLastBuild​(org.eclipse.jgit.lib.ObjectId sha1)
      • saveBuild

        public void saveBuild​(Build build)
      • getLastBuildOfBranch

        public Build getLastBuildOfBranch​(String branch)
      • getLastBuiltRevision

        public hudson.plugins.git.Revision getLastBuiltRevision()
        Gets revision of the previous build.
        revision of the last build. May be null will be returned if nothing has been checked out (e.g. due to wrong repository or branch)
      • getBuildsByBranchName

        public Map<String,​Build> getBuildsByBranchName()
      • setScmName

        public void setScmName​(String scmName)
      • getScmName

        public String getScmName()
      • addRemoteUrl

        public void addRemoteUrl​(String remoteUrl)
      • getRemoteUrls

        public Set<String> getRemoteUrls()
      • hasBeenReferenced

        public boolean hasBeenReferenced​(String remoteUrl)
      • getApi

        public Api getApi()
      • similarTo

        public boolean similarTo​(BuildData that)
        Like equals(Object) but doesn't check the URL as strictly, since those can vary while still representing the same remote repository.
        that - the BuildData to compare with.
        true if the supplied BuildData is similar to this BuildData.
      • hashCode

        public int hashCode()
        hashCode in class Object