1
0
forked from SPC/spc-site
varvara_kaplenko/.space.kts

25 lines
661 B
Plaintext
Raw Normal View History

2022-05-25 17:28:59 +00:00
import circlet.pipelines.script.put
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 17:28:59 +00:00
2022-05-25 16:18:00 +00:00
container(image = "openjdk:11") {
kotlinScript { api ->
api.gradlew("installDist")
2022-05-25 17:34:17 +00:00
api.fileShare().put(java.io.File("build/install"))
2022-05-25 16:18:00 +00:00
}
2022-05-25 17:28:59 +00:00
}
container(image = "openjdk:11") {
2022-05-25 18:40:23 +03:00
env["HOST"] = Params("spc-host")
env["USER"] = Secrets("spc-webmaster-user")
env["ID"] = Secrets("spc-webmaster-id")
2022-05-22 16:52:36 +03:00
shellScript {
interpreter = "/bin/bash"
2022-05-25 17:28:59 +00:00
content = "echo \$ID | ssh -i /dev/stdin -r /mnt/space/share/spc-site/ \"\$USER@\$HOST:/opt\""
2022-05-22 16:52:36 +03:00
}
}
}