add deployments
This commit is contained in:
parent
2e8de0b183
commit
f218853544
@ -22,10 +22,16 @@ job("Publish") {
|
|||||||
//read version from build file
|
//read version from build file
|
||||||
val version = java.nio.file.Path.of("build/project-version.txt").readText()
|
val version = java.nio.file.Path.of("build/project-version.txt").readText()
|
||||||
|
|
||||||
|
val revisionSuffix = if (version.endsWith("SNAPSHOT")) {
|
||||||
|
"-" + api.gitRevision().take(7)
|
||||||
|
} else {
|
||||||
|
""
|
||||||
|
}
|
||||||
|
|
||||||
api.space().projects.automation.deployments.start(
|
api.space().projects.automation.deployments.start(
|
||||||
project = api.projectIdentifier(),
|
project = api.projectIdentifier(),
|
||||||
targetIdentifier = TargetIdentifier.Key("maps-kt"),
|
targetIdentifier = TargetIdentifier.Key("maps-kt"),
|
||||||
version = version,
|
version = version+revisionSuffix,
|
||||||
// automatically update deployment status based on a status of a job
|
// automatically update deployment status based on a status of a job
|
||||||
syncWithAutomationJob = true
|
syncWithAutomationJob = true
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user