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<Integer> allowedMajor, Optional<Instant> buildTime, Optional<String> sourceUrl, Optional<String> commit, Optional<String> bundleHash, Optional<Instant> obsoleteAt, boolean hasPackage, boolean shouldSkip, Optional<String> description, Optional<Instant> submittedAt, 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, Optional<Integer> allowedMajor) 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<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.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 zoneReturns the instant at which this became obsolete, i.e., no longer relevant for automated deployments.obsoleteAt(Instant now) Returns a copy of this which is obsolete now.intrisk()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 knownInstant at which this version was submitted to the build system.toString()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<Integer> allowedMajor, Optional<Instant> buildTime, Optional<String> sourceUrl, Optional<String> commit, Optional<String> bundleHash, Optional<Instant> obsoleteAt, boolean hasPackage, boolean shouldSkip, Optional<String> description, Optional<Instant> submittedAt, int risk)
-
-
Method Details
-
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
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. -
allowedMajor
-
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. -
obsoleteAt
Returns a copy of this which is obsolete now. -
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
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. -
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
-
hashCode
public int hashCode() -
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<ApplicationVersion>
-