.bamboo.specs.extension.bamboo-specs-extension.1.3.18.source-code.DeploymentExtension.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bamboo-specs-extension Show documentation
Show all versions of bamboo-specs-extension Show documentation
A Kotlin DSL for Bamboo Specs
The newest version!
package com.atlassian.bamboo.specs.extension
import com.atlassian.bamboo.specs.api.builders.deployment.Deployment
import com.atlassian.bamboo.specs.api.builders.deployment.Environment
fun Deployment.environment(name: String, description: String? = null, init: SpecsDsl = {}) {
val environment = Environment(name)
// Store env -> deployment mapping in top-level Specs object, so we can have a nice Kotliny way of defining permissions on it
Specs.addToEnvMap(environment, this)
if (description != null) {
environment.description(description)
}
environment.init()
this.environments(environment)
}