Deployment

data class Deployment(name: String, isProduction: Boolean, isStaging: Boolean, isTest: Boolean, isLocalDevelopment: Boolean)

Deployment describes the context in which the application is running

Constructors

Link copied to clipboard
fun Deployment(name: String, isProduction: Boolean = false, isStaging: Boolean = false, isTest: Boolean = false, isLocalDevelopment: Boolean = false)

Functions

Link copied to clipboard
fun mapToEnvironmentName(): String

Properties

Link copied to clipboard
val isFake: Boolean

Returns true if running outside of a cluster (CI or local development). Mutually exclusive with isReal.

Link copied to clipboard
val isLocalDevelopment: Boolean = false

Whether the service is running on a local developer machine, including as a Docker image.

Link copied to clipboard
val isProduction: Boolean = false

Whether the service is running in a production environment, having an SLA or handling customer data.

Link copied to clipboard
val isReal: Boolean

Returns true if running in a managed cluster, such as a staging or production cluster. Mutually exclusive with isFake.

Link copied to clipboard
val isStaging: Boolean = false

Whether the service is running in a staging environment.

Link copied to clipboard
val isTest: Boolean = false

Whether the service is running in a test environment, either locally or in a CI.

Link copied to clipboard
val name: String

The name of this deployment. This is used for debugging and should not be parsed.