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

28 lines
734 B
Plaintext
Raw Normal View History

2022-05-25 21:23:56 +03: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 18:40:23 +03:00
2022-05-25 21:23:56 +03:00
container(image = "openjdk:11") {
kotlinScript { api ->
api.gradlew("installDist")
api.fileShare().put(java.io.File("build/install"))
}
}
2022-05-25 18:40:23 +03:00
2022-05-25 21:23:56 +03: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 21:52:55 +03:00
content = """
2022-06-01 10:47:00 +03:00
echo ${'$'}ID > id.key
scp -r -i id.key /mnt/space/share/spc-site/ "${'$'}USER@${'$'}HOST:/opt"
2022-05-25 21:52:55 +03:00
""".trimIndent()
2022-05-22 16:52:36 +03:00
}
}
}