Compare commits

..
9 Commits
Author SHA1 Message Date
2martens 9c4feee043 Use 127.0.0.1 as address
continuous-integration/drone/push Build is failing
2023-08-16 00:25:15 +02:00
2martens 1a50b40eaf Load log4j2.xml from resources
continuous-integration/drone/push Build is failing
2023-08-15 23:50:42 +02:00
2martens 3c7464a0cf Fix mainClassName
continuous-integration/drone/push Build is failing
2023-08-15 22:37:45 +02:00
2martens 2fe84fec45 Exclude env.sh script
continuous-integration/drone/push Build is failing
2023-08-15 09:28:32 +02:00
2martens bc1f85865c Enable bootJar 2023-08-15 09:28:18 +02:00
2martens 17bde7aa42 Fix config import property 2023-08-15 09:21:22 +02:00
2martens 9d21dfe032 Added scripts to help with nebula releases 2023-08-15 08:25:46 +02:00
2martens e463f0b7a8 Removed not required toString 2023-08-15 08:24:02 +02:00
2martens 36345e5338 Remove likely not required script
continuous-integration/drone/push Build is failing
continuous-integration/drone Build is failing
2023-08-15 08:09:58 +02:00
12 changed files with 30 additions and 49 deletions
+1 -1
View File
@@ -80,7 +80,7 @@ steps:
- touch $HOME/.ssh/known_hosts - touch $HOME/.ssh/known_hosts
- chmod 600 $HOME/.ssh/known_hosts - chmod 600 $HOME/.ssh/known_hosts
- ssh-keyscan -H git.2martens.de > $HOME/.ssh/known_hosts 2>/dev/null - ssh-keyscan -H git.2martens.de > $HOME/.ssh/known_hosts 2>/dev/null
- GIT_SSH=/drone/src/module-deploy/scripts/ssh-git-command.sh ./gradlew final jib - ./gradlew -Prelease.useLastTag=true final jib
volumes: volumes:
- name: cache - name: cache
+1
View File
@@ -12,6 +12,7 @@ build/
**/*.log **/*.log
**/*.hprof **/*.hprof
**/generated/** **/generated/**
env.sh
### STS ### ### STS ###
.apt_generated .apt_generated
@@ -1,6 +1,4 @@
import org.gradle.accessors.dm.LibrariesForLibs import org.gradle.accessors.dm.LibrariesForLibs
import java.time.ZonedDateTime
import java.time.format.DateTimeFormatter
plugins { plugins {
jacoco jacoco
@@ -51,22 +49,6 @@ tasks.jacocoTestReport {
} }
} }
val formatter: DateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSZ")
tasks.jar {
doFirst {
manifest {
attributes["Implementation-Title"] = rootProject.name
attributes["Implementation-Version"] = archiveVersion.get()
attributes["Implementation-Vendor"] = "Jim Martens"
attributes["Build-Timestamp"] = ZonedDateTime.now().format(formatter)
attributes["Created-By"] = "Gradle ${gradle.gradleVersion}"
attributes["Build-Jdk"] = "${providers.systemProperty("java.version").get()} (${providers.systemProperty("java.vendor").get()} ${providers.systemProperty("java.vm.version").get()})"
attributes["Build-OS"] = "${providers.systemProperty("os.name").get()} ${providers.systemProperty("os.arch").get()} ${providers.systemProperty("os.version").get()}"
}
}
}
normalization.runtimeClasspath.metaInf { normalization.runtimeClasspath.metaInf {
ignoreAttribute("Build-Timestamp") ignoreAttribute("Build-Timestamp")
} }
@@ -13,6 +13,6 @@ tasks.register("writeVersionProperties") {
val directory = buildDir val directory = buildDir
doLast { doLast {
Files.createDirectories(directory.toPath()) Files.createDirectories(directory.toPath())
File("$buildDir/version.properties").writeText("VERSION=${project.version.toString()}\n") File("$buildDir/version.properties").writeText("VERSION=${project.version}\n")
} }
} }
@@ -1,4 +1,7 @@
import org.gradle.accessors.dm.LibrariesForLibs import org.gradle.accessors.dm.LibrariesForLibs
import java.time.ZonedDateTime
import java.time.format.DateTimeFormatter
import java.time.format.DateTimeFormatter.ofPattern
plugins { plugins {
id("org.springframework.boot") id("org.springframework.boot")
@@ -57,27 +60,21 @@ tasks.named("buildAll") {
dependsOn("integrationTest") dependsOn("integrationTest")
} }
springBoot { val formatter: DateTimeFormatter = ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSZ")
buildInfo()
}
tasks.bootJar { tasks.bootJar {
enabled = false manifest {
attributes["Implementation-Title"] = rootProject.name
attributes["Implementation-Version"] = archiveVersion.get()
attributes["Implementation-Vendor"] = "Jim Martens"
attributes["Build-Timestamp"] = ZonedDateTime.now().format(formatter)
attributes["Created-By"] = "Gradle ${gradle.gradleVersion}"
attributes["Build-Jdk"] = "${providers.systemProperty("java.version").get()} (${providers.systemProperty("java.vendor").get()} ${providers.systemProperty("java.vm.version").get()})"
attributes["Build-OS"] = "${providers.systemProperty("os.name").get()} ${providers.systemProperty("os.arch").get()} ${providers.systemProperty("os.version").get()}"
}
} }
tasks.jar { springBoot {
enabled = true buildInfo()
archiveClassifier.set("") mainClass.set("de.twomartens.wahlrecht.MainApplicationKt")
}
tasks.bootDistZip {
dependsOn(tasks.jar)
}
tasks.bootDistTar {
dependsOn(tasks.jar)
}
tasks.bootStartScripts {
dependsOn(tasks.jar)
} }
+2 -4
View File
@@ -31,10 +31,8 @@ jib {
} }
} }
container { container {
extraClasspath = listOf("/configmap") mainClass = "de.twomartens.wahlrecht.MainApplicationKt"
mainClass = "de.twomartens.wahlrecht.MainApplication"
jvmFlags = listOf("-XX:+UseContainerSupport", jvmFlags = listOf("-XX:+UseContainerSupport",
"-XX:MaxRAMPercentage=75.0", "-XX:MaxRAMPercentage=75.0")
"-Dlog4j.configurationFile=/configmap/log4j2.xml")
} }
} }
-2
View File
@@ -1,2 +0,0 @@
#!/bin/bash
ssh $@
@@ -23,9 +23,8 @@ management:
http.server.requests: true http.server.requests: true
spring: spring:
spring: config:
config: import: "optional:configserver:http://127.0.0.1:8888/config"
import: "optional:configserver:http://localhost:8888/config"
main: main:
banner-mode: off banner-mode: off
profiles: profiles:
+2
View File
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
./gradlew -Prelease.scope=major $@
+2
View File
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
./gradlew -Prelease.scope=minor $@
+2
View File
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
./gradlew -Prelease.scope=patch $@