diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 49e0a3f..f9f2852 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -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") { useJUnitPlatform() } diff --git a/captain-definition b/captain-definition deleted file mode 100644 index 17db556..0000000 --- a/captain-definition +++ /dev/null @@ -1,4 +0,0 @@ - { - "schemaVersion": 2, - "dockerfilePath": "./Dockerfile" - }