Update CD

This commit is contained in:
Alexander Nozik 2022-06-15 16:29:59 +00:00 committed by Space
parent 0f223da648
commit 5e1625d98c

View File

@ -27,3 +27,24 @@ job("Deploy") {
}
}
}
job("Restart service"){
startOn {
gitPush { enabled = false }
}
container(image = "openjdk:11") {
env["HOST"] = Params("spc-host")
env["USER"] = Secrets("spc-webmaster-user")
env["ID"] = Secrets("spc-webmaster-id")
shellScript {
interpreter = "/bin/bash"
content = """
echo ${'$'}ID > id.key
chmod 400 id.key
ssh -i id.key -t "${'$'}USER@${'$'}HOST" "systemctl restart sciprog-site"
""".trimIndent()
}
}
}