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") {
|
2023-07-11 18:31:34 +03:00
|
|
|
env["SPC_HOST"] = "{{ project:spc-host }}"
|
|
|
|
env["SPC_USER"] = "{{ project:spc-webmaster-user }}"
|
|
|
|
env["SPC_ID"] = "{{ project: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",
|
2023-07-11 18:31:34 +03:00
|
|
|
// automatically update deployment status based on the status of the job
|
2022-07-07 20:15:51 +03:00
|
|
|
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") {
|
2023-07-11 18:31:34 +03:00
|
|
|
env["SPC_HOST"] = "{{ project:spc-host }}"
|
|
|
|
env["SPC_USER"] = "{{ project:spc-webmaster-user }}"
|
|
|
|
env["SPC_ID"] = "{{ project: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
|
|
|
}
|