Update deploy script

This commit is contained in:
Alexander Nozik 2022-07-10 12:58:51 +03:00
parent adfd6641cc
commit 3565a03d57
No known key found for this signature in database
GPG Key ID: F7FCF2DD25C71357

View File

@ -16,15 +16,19 @@ job("Publish"){
api.space().projects.automation.deployments.start(
project = api.projectIdentifier(),
targetIdentifier = TargetIdentifier.Key("gradle-tools"),
version = "current",
version = api.gitRevision(),
// automatically update deployment status based on a status of a job
syncWithAutomationJob = true
)
api.gradlew(
"publishAllPublicationsToSpaceRepository",
"-Ppublishing.space.user=\"$spaceUser\"",
"-Ppublishing.space.token=\"$spaceToken\"",
)
try {
api.gradlew(
"publishAllPublicationsToSpaceRepository",
"-Ppublishing.space.user=\"$spaceUser\"",
"-Ppublishing.space.token=\"$spaceToken\"",
)
} catch (ex: Exception) {
println("Publish failed")
}
}
}
}