All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.nemerosa.ontrack.kdsl.spec.extension.general.PromotionDependenciesProperty.kt Maven / Gradle / Ivy

There is a newer version: 4.4.5
Show newest version
package net.nemerosa.ontrack.kdsl.spec.extension.general

import net.nemerosa.ontrack.kdsl.spec.PromotionLevel
import net.nemerosa.ontrack.kdsl.spec.deleteProperty
import net.nemerosa.ontrack.kdsl.spec.getProperty
import net.nemerosa.ontrack.kdsl.spec.setProperty

/**
 * Sets a promotion dependencies property on a promotion level.
 */
var PromotionLevel.promotionDependencies: List?
    get() = getProperty(PROMOTION_DEPENDENCIES_PROPERTY)?.path("dependencies")?.map { it.asText() }
    set(value) {
        if (value != null) {
            setProperty(PROMOTION_DEPENDENCIES_PROPERTY, mapOf("dependencies" to value))
        } else {
            deleteProperty(PROMOTION_DEPENDENCIES_PROPERTY)
        }
    }

const val PROMOTION_DEPENDENCIES_PROPERTY = "net.nemerosa.ontrack.extension.general.PromotionDependenciesPropertyType"




© 2015 - 2024 Weber Informatics LLC | Privacy Policy