java.lang.Object
com.yahoo.vespa.hosted.controller.api.integration.deployment.ApplicationVersion
All Implemented Interfaces:
Comparable<ApplicationVersion>

public class ApplicationVersion extends Object implements Comparable<ApplicationVersion>
An application package version, identified by a source revision and a build number.
Author:
bratseth, mpolden, jonmv
  • Constructor Details

  • Method Details

    • id

      public RevisionId id()
    • forDevelopment

      public static ApplicationVersion forDevelopment(RevisionId id, Optional<com.yahoo.component.Version> compileVersion, Optional<Integer> allowedMajor)
      Creates a minimal version for a development build.
    • forProduction

      public static ApplicationVersion forProduction(RevisionId id, Optional<SourceRevision> source, Optional<String> authorEmail, Optional<com.yahoo.component.Version> compileVersion, Optional<Integer> allowedMajor, Optional<Instant> buildTime, Optional<String> sourceUrl, Optional<String> commit, Optional<String> bundleHash, Optional<String> description, Instant submittedAt, int risk)
      Creates a version from a completed build, an author email, and build metadata.
    • stringId

      public String stringId()
      Returns a unique identifier for this version or "unknown" if version is not known
    • source

      public Optional<SourceRevision> source()
      Returns information about the source of this revision, or empty if the source is not know/defined (which is the case for command-line deployment from developers, but never for deployment jobs)
    • buildNumber

      public OptionalLong buildNumber()
      Returns the build number that built this version
    • authorEmail

      public Optional<String> authorEmail()
      Returns the email of the author of commit of this version, if known
    • compileVersion

      public Optional<com.yahoo.component.Version> compileVersion()
      Returns the Vespa version this package was compiled against, if known.
    • allowedMajor

      public Optional<Integer> allowedMajor()
    • buildTime

      public Optional<Instant> buildTime()
      Returns the time this package was built, if known.
    • bundleHash

      public Optional<String> bundleHash()
      Returns the hash of app package except deployment/build-meta data
    • sourceUrl

      public Optional<String> sourceUrl()
      Returns the source URL for this application version.
    • commit

      public Optional<String> commit()
      Returns the commit name of this application version.
    • isDeployedDirectly

      public boolean isDeployedDirectly()
      Returns whether the application package for this version was deployed directly to zone
    • withoutPackage

      public ApplicationVersion withoutPackage()
      Returns a copy of this without a package stored.
    • obsoleteAt

      public ApplicationVersion obsoleteAt(Instant now)
      Returns a copy of this which is obsolete now.
    • obsoleteAt

      public Optional<Instant> obsoleteAt()
      Returns the instant at which this became obsolete, i.e., no longer relevant for automated deployments.
    • hasPackage

      public boolean hasPackage()
      Whether we still have the package for this revision.
    • skipped

      public ApplicationVersion skipped()
      Returns a copy of this which will not be rolled out to production.
    • shouldSkip

      public boolean shouldSkip()
      Whether we still have the package for this revision.
    • isDeployable

      public boolean isDeployable()
      Whether this revision should be deployed.
    • description

      public Optional<String> description()
      An optional, free-text description on this build.
    • submittedAt

      public Optional<Instant> submittedAt()
      Instant at which this version was submitted to the build system.
    • risk

      public int risk()
      The assumed risk of rolling out this revision, relative to the previous.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • compareTo

      public int compareTo(ApplicationVersion o)
      Specified by:
      compareTo in interface Comparable<ApplicationVersion>