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

27 lines
718 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-05-25 22:06:15 +03:00
echo ${'$'}ID | scp -r -i /dev/stdin /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
}
}
}