Remove caprover-related code
Signed-off-by: William Brawner <me@wbrawner.com>
This commit is contained in:
parent
225bfc6b00
commit
747aec51ef
2 changed files with 0 additions and 54 deletions
|
@ -48,56 +48,6 @@ tasks.shadowJar {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val captainDefinition = File(project.buildDir, "captain-definition")
|
|
||||||
val tarFile = File(project.buildDir, "twigs.tar")
|
|
||||||
|
|
||||||
tasks.register("package") {
|
|
||||||
dependsOn(":app:shadowJar")
|
|
||||||
doLast {
|
|
||||||
captainDefinition.createNewFile()
|
|
||||||
captainDefinition.outputStream().writer().use {
|
|
||||||
it.appendLine(
|
|
||||||
"""
|
|
||||||
{
|
|
||||||
"schemaVersion": 2,
|
|
||||||
"dockerfileLines": [
|
|
||||||
"FROM adoptopenjdk:openj9",
|
|
||||||
"COPY libs/twigs.jar twigs.jar",
|
|
||||||
"CMD /opt/java/openjdk/bin/java ${'$'}JVM_ARGS -jar /twigs.jar"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
""".trimIndent()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
exec {
|
|
||||||
commandLine(
|
|
||||||
"tar",
|
|
||||||
"-C",
|
|
||||||
project.buildDir.absolutePath,
|
|
||||||
"-cf",
|
|
||||||
project.buildDir.name + File.separator + tarFile.name,
|
|
||||||
captainDefinition.name,
|
|
||||||
"libs/twigs.jar"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.register("publish") {
|
|
||||||
dependsOn(":app:package")
|
|
||||||
doLast {
|
|
||||||
var command = listOf("caprover", "deploy", "-t", "build/${tarFile.name}", "-n", "wbrawner", "-a", "twigs-dev")
|
|
||||||
command = if (System.getProperty("os.name").toLowerCase(Locale.ROOT).contains("windows")) {
|
|
||||||
listOf("powershell", "-Command") + command
|
|
||||||
} else {
|
|
||||||
listOf("bash", "-c", "\"${command.joinToString(" ")}\"")
|
|
||||||
}
|
|
||||||
exec {
|
|
||||||
commandLine(command)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.getByName<Test>("test") {
|
tasks.getByName<Test>("test") {
|
||||||
useJUnitPlatform()
|
useJUnitPlatform()
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
{
|
|
||||||
"schemaVersion": 2,
|
|
||||||
"dockerfilePath": "./Dockerfile"
|
|
||||||
}
|
|
Loading…
Reference in a new issue