Class ApplicationVersion
java.lang.Object
com.yahoo.vespa.hosted.controller.api.integration.deployment.ApplicationVersion
- All Implemented Interfaces:
Comparable<ApplicationVersion>
An application package version, identified by a source revision and a build number.
- Author:
- bratseth, mpolden, jonmv
-
Constructor Summary
ConstructorsConstructorDescriptionApplicationVersion(RevisionId id, Optional<SourceRevision> source, Optional<String> authorEmail, Optional<com.yahoo.component.Version> compileVersion, Optional<Instant> buildTime, Optional<String> sourceUrl, Optional<String> commit, Optional<String> bundleHash, boolean hasPackage, boolean shouldSkip, Optional<String> description, int risk) -
Method Summary
Modifier and TypeMethodDescriptionReturns the email of the author of commit of this version, if knownReturns the build number that built this versionReturns the time this package was built, if known.Returns the hash of app package except deployment/build-meta datacommit()Returns the commit name of this application version.intOptional<com.yahoo.component.Version>Returns the Vespa version this package was compiled against, if known.An optional, free-text description on this build.booleanstatic ApplicationVersionforDevelopment(RevisionId id, Optional<com.yahoo.component.Version> compileVersion) Creates a minimal version for a development build.static ApplicationVersionforProduction(RevisionId id, Optional<SourceRevision> source, Optional<String> authorEmail, Optional<com.yahoo.component.Version> compileVersion, Optional<Instant> buildTime, Optional<String> sourceUrl, Optional<String> commit, Optional<String> bundleHash, Optional<String> description, int risk) Creates a version from a completed build, an author email, and build metadata.static ApplicationVersionfrom(RevisionId id, SourceRevision source) Create an application package version from a completed build, without an author emailstatic ApplicationVersionfrom(RevisionId id, SourceRevision source, String authorEmail, com.yahoo.component.Version compileVersion, Instant buildTime) Creates a version from a completed build, an author email, and build metadata.inthashCode()booleanWhether we still have the package for this revision.id()booleanWhether this revision should be deployed.booleanReturns whether the application package for this version was deployed directly to zoneintrisk()The assumed risk of rolling out this revision, relative to the previous.booleanWhether we still have the package for this revision.skipped()Returns a copy of this which will not be rolled out to production.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)Returns the source URL for this application version.stringId()Returns a unique identifier for this version or "unknown" if version is not knowntoString()Returns a copy of this without a package stored.
-
Constructor Details
-
ApplicationVersion
public ApplicationVersion(RevisionId id, Optional<SourceRevision> source, Optional<String> authorEmail, Optional<com.yahoo.component.Version> compileVersion, Optional<Instant> buildTime, Optional<String> sourceUrl, Optional<String> commit, Optional<String> bundleHash, boolean hasPackage, boolean shouldSkip, Optional<String> description, int risk)
-
-
Method Details
-
id
-
from
Create an application package version from a completed build, without an author email -
from
public static ApplicationVersion from(RevisionId id, SourceRevision source, String authorEmail, com.yahoo.component.Version compileVersion, Instant buildTime) Creates a version from a completed build, an author email, and build metadata. -
forDevelopment
public static ApplicationVersion forDevelopment(RevisionId id, Optional<com.yahoo.component.Version> compileVersion) 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<Instant> buildTime, Optional<String> sourceUrl, Optional<String> commit, Optional<String> bundleHash, Optional<String> description, int risk) Creates a version from a completed build, an author email, and build metadata. -
stringId
Returns a unique identifier for this version or "unknown" if version is not known -
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
Returns the build number that built this version -
authorEmail
Returns the email of the author of commit of this version, if known -
compileVersion
Returns the Vespa version this package was compiled against, if known. -
buildTime
Returns the time this package was built, if known. -
bundleHash
Returns the hash of app package except deployment/build-meta data -
sourceUrl
Returns the source URL for this application version. -
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
Returns a copy of this without a package stored. -
hasPackage
public boolean hasPackage()Whether we still have the package for this revision. -
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
An optional, free-text description on this build. -
risk
public int risk()The assumed risk of rolling out this revision, relative to the previous. -
equals
-
hashCode
public int hashCode() -
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<ApplicationVersion>
-