2022-05-22 16:52:36 +03:00
|
|
|
job("Deploy") {
|
2022-05-25 18:40:23 +03:00
|
|
|
startOn {
|
|
|
|
gitPush { enabled = false }
|
2022-05-22 16:52:36 +03:00
|
|
|
}
|
2022-05-25 18:40:23 +03:00
|
|
|
|
2022-06-19 14:25:29 +03:00
|
|
|
container(image = "gradle:jdk17-alpine") {
|
2022-06-19 14:18:44 +03:00
|
|
|
env["SPC_HOST"] = Params("spc-host")
|
2022-06-19 14:27:52 +03:00
|
|
|
env["SPC_USER"] = Secrets("spc-webmaster-user")
|
|
|
|
env["SPC_ID"] = Secrets("spc-webmaster-id")
|
2022-05-25 21:23:56 +03:00
|
|
|
kotlinScript { api ->
|
2022-07-07 20:15:51 +03:00
|
|
|
api.space().projects.automation.deployments.start(
|
|
|
|
project = api.projectIdentifier(),
|
|
|
|
targetIdentifier = TargetIdentifier.Key("spc-site"),
|
|
|
|
version = "current",
|
|
|
|
// automatically update deployment status based on a status of a job
|
|
|
|
syncWithAutomationJob = true
|
|
|
|
)
|
2022-06-20 11:55:18 +03:00
|
|
|
api.gradle("uploadDistribution")
|
2022-05-22 16:52:36 +03:00
|
|
|
}
|
|
|
|
}
|
2022-06-15 19:29:59 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
job("Restart service"){
|
|
|
|
startOn {
|
|
|
|
gitPush { enabled = false }
|
|
|
|
}
|
|
|
|
|
2022-06-19 14:25:29 +03:00
|
|
|
container(image = "gradle:jdk17-alpine") {
|
2022-06-19 14:18:44 +03:00
|
|
|
env["SPC_HOST"] = Params("spc-host")
|
2022-06-19 14:27:52 +03:00
|
|
|
env["SPC_USER"] = Secrets("spc-webmaster-user")
|
|
|
|
env["SPC_ID"] = Secrets("spc-webmaster-id")
|
2022-06-19 14:18:44 +03:00
|
|
|
kotlinScript { api ->
|
2022-06-19 19:36:48 +03:00
|
|
|
api.gradle("reloadDistribution")
|
2022-06-15 19:29:59 +03:00
|
|
|
}
|
|
|
|
}
|
2022-05-22 16:52:36 +03:00
|
|
|
}
|